{% extends 'base.html' %}

{% block title %}
{% if lan == 'cn' %}
SoloX - 性能测试
{% else %}
SoloX - Application Performance Monitoring
{% endif %}
{% endblock %}

{% block css %}{% endblock %}

{% block page_title %}
{% if platform == 'Android' %}
<a class="btn btn-primary" href="/?platform=Android&lan={{ lan }}" >
    <svg t="1651055484580" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2077" width="2000" height="2000"><path d="M133.336 914.896a381.336 81.488 0 1 0 762.672 0 381.336 81.488 0 1 0-762.672 0Z" fill="#B8CBCD" p-id="2078"></path><path d="M373.336 769.4a87.68 87.68 0 0 1-24-3.4v123.4a56 56 0 1 0 112 0v-120h-88z" fill="#B2EDA6" p-id="2079"></path><path d="M405.336 961.4c-39.696 0-72-32.296-72-72V766a16.008 16.008 0 0 1 20.36-15.392 72.248 72.248 0 0 0 19.64 2.792h88a16 16 0 0 1 16 16v120c0 39.704-32.304 72-72 72z m-40-176.32v104.32c0 22.056 17.944 40 40 40s40-17.944 40-40v-104h-72c-2.664 0-5.328-0.112-8-0.32z" fill="#3C663E" p-id="2080"></path><path d="M661.336 769.4c8.328 0 16.36-1.232 24-3.4v123.4a56 56 0 1 1-112 0v-120h88z" fill="#B2EDA6" p-id="2081"></path><path d="M629.336 961.4c-39.696 0-72-32.296-72-72v-120a16 16 0 0 1 16-16h88c6.496 0 13.096-0.936 19.64-2.792a15.984 15.984 0 0 1 20.368 15.392v123.4c-0.008 39.704-32.312 72-72.008 72z m-40-176v104c0 22.056 17.944 40 40 40s40-17.944 40-40v-104.32c-2.672 0.208-5.344 0.32-8 0.32h-72z" fill="#3C663E" p-id="2082"></path><path d="M765.336 393.4v368c0 35.344-104.824 64-244 64s-252-28.656-252-64v-368" fill="#B2EDA6" p-id="2083"></path><path d="M521.336 841.4c-92.696 0-268-16.72-268-80v-368a16 16 0 0 1 32 0v368c0 14.352 80.296 48 236 48 157.888 0 228-34.784 228-48v-368a16 16 0 0 1 32 0v368c0 55.264-130.592 80-260 80zM649.336 197.4a23.984 23.984 0 0 1-16.968-40.968l108-108a23.984 23.984 0 0 1 33.936 0 23.984 23.984 0 0 1 0 33.936l-108 108a23.928 23.928 0 0 1-16.968 7.032zM397.336 197.4a23.904 23.904 0 0 1-16.968-7.032l-108-108a23.984 23.984 0 0 1 0-33.936 23.984 23.984 0 0 1 33.936 0l108 108a23.984 23.984 0 0 1-16.968 40.968z" fill="#3C663E" p-id="2084"></path><path d="M877.336 661.4a56 56 0 1 1-112 0v-224a56 56 0 1 1 112 0v224z" fill="#B2EDA6" p-id="2085"></path><path d="M821.336 733.4c-39.696 0-72-32.296-72-72v-224c0-39.704 32.304-72 72-72s72 32.296 72 72v224c0 39.704-32.304 72-72 72z m0-336c-22.056 0-40 17.944-40 40v224c0 22.056 17.944 40 40 40s40-17.944 40-40v-224c0-22.056-17.944-40-40-40z" fill="#3C663E" p-id="2086"></path><path d="M269.336 661.4a56 56 0 1 1-112 0v-224a56 56 0 1 1 112 0v224z" fill="#B2EDA6" p-id="2087"></path><path d="M213.336 733.4c-39.696 0-72-32.296-72-72v-224c0-39.704 32.304-72 72-72s72 32.296 72 72v224c0 39.704-32.304 72-72 72z m0-336c-22.056 0-40 17.944-40 40v224c0 22.056 17.944 40 40 40s40-17.944 40-40v-224c0-22.056-17.944-40-40-40z" fill="#3C663E" p-id="2088"></path><path d="M725.336 809.4a24 24 0 0 1-24-24v-352a24 24 0 1 1 48 0v352a24 24 0 0 1-24 24z" fill="#3C663E" p-id="2089"></path><path d="M309.336 809.4a24 24 0 0 1-24-24v-352a24 24 0 1 1 48 0v352a24 24 0 0 1-24 24zM381.336 817.728a16 16 0 0 1-16-16V433.4a16 16 0 0 1 32 0v368.328a16 16 0 0 1-16 16z" fill="#FFFFFF" p-id="2090"></path><path d="M517.336 145.4c-136.968 0-248 111.032-248 248 0 35.344 112.824 64 252 64s244-28.656 244-64c0-136.968-111.04-248-248-248z" fill="#B2EDA6" p-id="2091"></path><path d="M521.336 473.4c-92.696 0-268-16.72-268-80 0-145.568 118.432-264 264-264s264 118.432 264 264c0 55.264-130.592 80-260 80z m-4-312c-127.928 0-232 104.08-232 232 0 14.352 80.296 48 236 48 157.888 0 228-34.784 228-48 0-127.92-104.08-232-232-232z" fill="#3C663E" p-id="2092"></path><path d="M413.336 321.4m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" fill="#FFFFFF" p-id="2093"></path><path d="M413.336 369.4c-26.472 0-48-21.528-48-48s21.528-48 48-48 48 21.528 48 48c0 26.464-21.536 48-48 48z m0-64c-8.824 0-16 7.176-16 16 0 8.816 7.176 16 16 16s16-7.184 16-16c0-8.824-7.176-16-16-16z" fill="#3C663E" p-id="2094"></path><path d="M621.336 321.4m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" fill="#FFFFFF" p-id="2095"></path><path d="M621.336 369.4c-26.472 0-48-21.528-48-48s21.528-48 48-48 48 21.528 48 48c0 26.464-21.536 48-48 48z m0-64c-8.824 0-16 7.176-16 16 0 8.816 7.176 16 16 16s16-7.184 16-16c0-8.824-7.176-16-16-16z" fill="#3C663E" p-id="2096"></path><path d="M629.336 969.4c-44.112 0-80-35.888-80-80v-32.392c-21.176 0.584-42.728 0.504-64-0.248v32.64c0 44.112-35.888 80-80 80s-80-35.888-80-80v-54.616c-59.92-16.544-88-37.52-88-65.384V737.52a73.848 73.848 0 0 1-24 3.872c-44.112 0-80-35.888-80-80v-224c0-44.112 35.888-80 80-80a79.52 79.52 0 0 1 33.496 7.352c14.36-136.56 130.2-243.352 270.504-243.352s256.136 106.792 270.504 243.36a79.52 79.52 0 0 1 33.496-7.352c44.112 0 80 35.888 80 80v224c0 44.112-35.888 80-80 80a73.848 73.848 0 0 1-24-3.872v31.872c0 28.168-28.832 49.976-88 66.416v53.584c0 44.104-35.888 80-80 80z m-56-161.392a24 24 0 0 1 24 24v57.392c0 17.648 14.352 32 32 32s32-14.352 32-32v-72.208c0-11.136 7.648-20.808 18.488-23.36 46.368-10.944 64.912-22.48 69.512-27.232v-105.2c0-13.256 3.992-24 17.248-24s15.248 10.744 15.248 24c0 7.504 7.504 32 39.504 32 17.648 0 32-14.352 32-32v-224c0-17.648-14.352-32-32-32s-40 14.352-40 32c0 13.256-2.744 24-16 24s-16-22.24-16-35.504l-8-32.504c0-123.52-100.488-224-224-224s-224 109.64-224 233.152l-8.504 34.848c0 13.256-2.248 24-15.504 24s-17.248-15.992-17.248-29.248c0-17.648-21.104-26.752-38.752-26.752s-32 14.352-32 32v224c0 17.648 14.352 32 32 32 36 0 41-22.992 41-30.504 0-13.256-2.232-25.144 11.016-25.144 13.256 0 19.984 10.384 19.984 23.64v104.72c4.976 4.712 23.784 15.824 69.544 26.68a24 24 0 0 1 18.456 23.352v73.248c0 17.648 14.352 32 32 32s32-14.352 32-32v-57.84c0-6.624 2.736-12.952 7.56-17.496a24.032 24.032 0 0 1 17.928-6.464c35.92 2.24 73.696 2.384 109.208 0.448l1.312-0.024z" fill="#3C663E" p-id="2097"></path><path d="M521.336 841.4c-92.696 0-268-16.72-268-80v-368a16 16 0 0 1 32 0v368c0 14.352 80.296 48 236 48 157.888 0 228-34.784 228-48v-368a16 16 0 0 1 32 0v368c0 55.264-130.592 80-260 80z" fill="#3C663E" p-id="2098"></path></svg>
    {% if lan == 'cn' %} 安卓 {% else %} Android {% endif %}
</a>
<a class="btn btn-default"   href="/?platform=iOS&lan={{ lan }}" style="margin-left: 10px">
    <svg t="1656846283611" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3683" width="200" height="200"><path d="M649.785306 161.506856C707.566241 88.169516 694.232179 8.165145 689.787492 1.498114c-6.667031-6.667031-93.338433 6.667031-153.341711 86.671402-53.336247 73.33734-53.336247 153.341711-46.669217 160.008742C496.443594 254.845289 583.114997 248.178259 649.785306 161.506856L649.785306 161.506856zM649.785306 161.506856M794.237643 534.860588c-6.667031-106.672495 93.338433-173.342804 113.339526-186.676866l0-6.667031c0 0-86.671402-106.672495-213.34499-100.005464-80.004371 6.667031-120.006557 46.669217-173.342804 46.669217-66.67031 0-126.673588-46.669217-200.010928-46.669217-60.003278 0-233.346082 53.336247-246.680145 280.015299C63.086584 748.205579 223.095326 959.328225 283.098605 999.330411c60.003278 40.002186 100.005464 26.668124 166.675774-6.667031 33.335154-20.001093 140.00765-26.668124 200.010928 13.334062 73.33734 26.668124 180.009835 6.667031 300.016392-260.014206C934.245292 748.205579 800.904674 714.870423 794.237643 534.860588L794.237643 534.860588zM794.237643 534.860588" p-id="3684"></path></svg>
    {% if lan == 'cn' %} 苹果 {% else %} iOS {% endif %}
</a>
{% elif platform == 'iOS' %}
<a class="btn btn-default"  href="/?platform=Android&lan={{ lan }}" >
    <svg t="1651055484580" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2077" width="2000" height="2000"><path d="M133.336 914.896a381.336 81.488 0 1 0 762.672 0 381.336 81.488 0 1 0-762.672 0Z" fill="#B8CBCD" p-id="2078"></path><path d="M373.336 769.4a87.68 87.68 0 0 1-24-3.4v123.4a56 56 0 1 0 112 0v-120h-88z" fill="#B2EDA6" p-id="2079"></path><path d="M405.336 961.4c-39.696 0-72-32.296-72-72V766a16.008 16.008 0 0 1 20.36-15.392 72.248 72.248 0 0 0 19.64 2.792h88a16 16 0 0 1 16 16v120c0 39.704-32.304 72-72 72z m-40-176.32v104.32c0 22.056 17.944 40 40 40s40-17.944 40-40v-104h-72c-2.664 0-5.328-0.112-8-0.32z" fill="#3C663E" p-id="2080"></path><path d="M661.336 769.4c8.328 0 16.36-1.232 24-3.4v123.4a56 56 0 1 1-112 0v-120h88z" fill="#B2EDA6" p-id="2081"></path><path d="M629.336 961.4c-39.696 0-72-32.296-72-72v-120a16 16 0 0 1 16-16h88c6.496 0 13.096-0.936 19.64-2.792a15.984 15.984 0 0 1 20.368 15.392v123.4c-0.008 39.704-32.312 72-72.008 72z m-40-176v104c0 22.056 17.944 40 40 40s40-17.944 40-40v-104.32c-2.672 0.208-5.344 0.32-8 0.32h-72z" fill="#3C663E" p-id="2082"></path><path d="M765.336 393.4v368c0 35.344-104.824 64-244 64s-252-28.656-252-64v-368" fill="#B2EDA6" p-id="2083"></path><path d="M521.336 841.4c-92.696 0-268-16.72-268-80v-368a16 16 0 0 1 32 0v368c0 14.352 80.296 48 236 48 157.888 0 228-34.784 228-48v-368a16 16 0 0 1 32 0v368c0 55.264-130.592 80-260 80zM649.336 197.4a23.984 23.984 0 0 1-16.968-40.968l108-108a23.984 23.984 0 0 1 33.936 0 23.984 23.984 0 0 1 0 33.936l-108 108a23.928 23.928 0 0 1-16.968 7.032zM397.336 197.4a23.904 23.904 0 0 1-16.968-7.032l-108-108a23.984 23.984 0 0 1 0-33.936 23.984 23.984 0 0 1 33.936 0l108 108a23.984 23.984 0 0 1-16.968 40.968z" fill="#3C663E" p-id="2084"></path><path d="M877.336 661.4a56 56 0 1 1-112 0v-224a56 56 0 1 1 112 0v224z" fill="#B2EDA6" p-id="2085"></path><path d="M821.336 733.4c-39.696 0-72-32.296-72-72v-224c0-39.704 32.304-72 72-72s72 32.296 72 72v224c0 39.704-32.304 72-72 72z m0-336c-22.056 0-40 17.944-40 40v224c0 22.056 17.944 40 40 40s40-17.944 40-40v-224c0-22.056-17.944-40-40-40z" fill="#3C663E" p-id="2086"></path><path d="M269.336 661.4a56 56 0 1 1-112 0v-224a56 56 0 1 1 112 0v224z" fill="#B2EDA6" p-id="2087"></path><path d="M213.336 733.4c-39.696 0-72-32.296-72-72v-224c0-39.704 32.304-72 72-72s72 32.296 72 72v224c0 39.704-32.304 72-72 72z m0-336c-22.056 0-40 17.944-40 40v224c0 22.056 17.944 40 40 40s40-17.944 40-40v-224c0-22.056-17.944-40-40-40z" fill="#3C663E" p-id="2088"></path><path d="M725.336 809.4a24 24 0 0 1-24-24v-352a24 24 0 1 1 48 0v352a24 24 0 0 1-24 24z" fill="#3C663E" p-id="2089"></path><path d="M309.336 809.4a24 24 0 0 1-24-24v-352a24 24 0 1 1 48 0v352a24 24 0 0 1-24 24zM381.336 817.728a16 16 0 0 1-16-16V433.4a16 16 0 0 1 32 0v368.328a16 16 0 0 1-16 16z" fill="#FFFFFF" p-id="2090"></path><path d="M517.336 145.4c-136.968 0-248 111.032-248 248 0 35.344 112.824 64 252 64s244-28.656 244-64c0-136.968-111.04-248-248-248z" fill="#B2EDA6" p-id="2091"></path><path d="M521.336 473.4c-92.696 0-268-16.72-268-80 0-145.568 118.432-264 264-264s264 118.432 264 264c0 55.264-130.592 80-260 80z m-4-312c-127.928 0-232 104.08-232 232 0 14.352 80.296 48 236 48 157.888 0 228-34.784 228-48 0-127.92-104.08-232-232-232z" fill="#3C663E" p-id="2092"></path><path d="M413.336 321.4m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" fill="#FFFFFF" p-id="2093"></path><path d="M413.336 369.4c-26.472 0-48-21.528-48-48s21.528-48 48-48 48 21.528 48 48c0 26.464-21.536 48-48 48z m0-64c-8.824 0-16 7.176-16 16 0 8.816 7.176 16 16 16s16-7.184 16-16c0-8.824-7.176-16-16-16z" fill="#3C663E" p-id="2094"></path><path d="M621.336 321.4m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z" fill="#FFFFFF" p-id="2095"></path><path d="M621.336 369.4c-26.472 0-48-21.528-48-48s21.528-48 48-48 48 21.528 48 48c0 26.464-21.536 48-48 48z m0-64c-8.824 0-16 7.176-16 16 0 8.816 7.176 16 16 16s16-7.184 16-16c0-8.824-7.176-16-16-16z" fill="#3C663E" p-id="2096"></path><path d="M629.336 969.4c-44.112 0-80-35.888-80-80v-32.392c-21.176 0.584-42.728 0.504-64-0.248v32.64c0 44.112-35.888 80-80 80s-80-35.888-80-80v-54.616c-59.92-16.544-88-37.52-88-65.384V737.52a73.848 73.848 0 0 1-24 3.872c-44.112 0-80-35.888-80-80v-224c0-44.112 35.888-80 80-80a79.52 79.52 0 0 1 33.496 7.352c14.36-136.56 130.2-243.352 270.504-243.352s256.136 106.792 270.504 243.36a79.52 79.52 0 0 1 33.496-7.352c44.112 0 80 35.888 80 80v224c0 44.112-35.888 80-80 80a73.848 73.848 0 0 1-24-3.872v31.872c0 28.168-28.832 49.976-88 66.416v53.584c0 44.104-35.888 80-80 80z m-56-161.392a24 24 0 0 1 24 24v57.392c0 17.648 14.352 32 32 32s32-14.352 32-32v-72.208c0-11.136 7.648-20.808 18.488-23.36 46.368-10.944 64.912-22.48 69.512-27.232v-105.2c0-13.256 3.992-24 17.248-24s15.248 10.744 15.248 24c0 7.504 7.504 32 39.504 32 17.648 0 32-14.352 32-32v-224c0-17.648-14.352-32-32-32s-40 14.352-40 32c0 13.256-2.744 24-16 24s-16-22.24-16-35.504l-8-32.504c0-123.52-100.488-224-224-224s-224 109.64-224 233.152l-8.504 34.848c0 13.256-2.248 24-15.504 24s-17.248-15.992-17.248-29.248c0-17.648-21.104-26.752-38.752-26.752s-32 14.352-32 32v224c0 17.648 14.352 32 32 32 36 0 41-22.992 41-30.504 0-13.256-2.232-25.144 11.016-25.144 13.256 0 19.984 10.384 19.984 23.64v104.72c4.976 4.712 23.784 15.824 69.544 26.68a24 24 0 0 1 18.456 23.352v73.248c0 17.648 14.352 32 32 32s32-14.352 32-32v-57.84c0-6.624 2.736-12.952 7.56-17.496a24.032 24.032 0 0 1 17.928-6.464c35.92 2.24 73.696 2.384 109.208 0.448l1.312-0.024z" fill="#3C663E" p-id="2097"></path><path d="M521.336 841.4c-92.696 0-268-16.72-268-80v-368a16 16 0 0 1 32 0v368c0 14.352 80.296 48 236 48 157.888 0 228-34.784 228-48v-368a16 16 0 0 1 32 0v368c0 55.264-130.592 80-260 80z" fill="#3C663E" p-id="2098"></path></svg>
    {% if lan == 'cn' %} 安卓 {% else %} Android {% endif %}
</a>
<a class="btn btn-primary" style="margin-left: 10px" href="/?platform=iOS&lan={{ lan }}" >
    <svg t="1656846283611" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3683" width="200" height="200"><path d="M649.785306 161.506856C707.566241 88.169516 694.232179 8.165145 689.787492 1.498114c-6.667031-6.667031-93.338433 6.667031-153.341711 86.671402-53.336247 73.33734-53.336247 153.341711-46.669217 160.008742C496.443594 254.845289 583.114997 248.178259 649.785306 161.506856L649.785306 161.506856zM649.785306 161.506856M794.237643 534.860588c-6.667031-106.672495 93.338433-173.342804 113.339526-186.676866l0-6.667031c0 0-86.671402-106.672495-213.34499-100.005464-80.004371 6.667031-120.006557 46.669217-173.342804 46.669217-66.67031 0-126.673588-46.669217-200.010928-46.669217-60.003278 0-233.346082 53.336247-246.680145 280.015299C63.086584 748.205579 223.095326 959.328225 283.098605 999.330411c60.003278 40.002186 100.005464 26.668124 166.675774-6.667031 33.335154-20.001093 140.00765-26.668124 200.010928 13.334062 73.33734 26.668124 180.009835 6.667031 300.016392-260.014206C934.245292 748.205579 800.904674 714.870423 794.237643 534.860588L794.237643 534.860588zM794.237643 534.860588" p-id="3684" data-spm-anchor-id="a313x.7781069.0.i1" class="selected" fill="#ffffff"></path></svg>
    {% if lan == 'cn' %} 苹果 {% else %} iOS {% endif %}
</a>
{% endif %}
{% endblock %}

{% block navbar_nav %}
<ul class="navbar-nav">
    <li class="nav-item active" id="apm_tab" style="margin-left: 20px;font-weight: bolder;">
        <a class="nav-link" href="/?platform=Android&lan={{ lan }}">
            <span class="nav-link-icon d-md-none d-lg-inline-block">
                <svg t="1635060342196" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="82258" width="200" height="200"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#FBD000" p-id="82259"></path><path d="M949.6 848H92.8c-4.8 0-8-3.2-8-8s3.2-8 8-8h856.8c4.8 0 8 3.2 8 8s-4 8-8 8z" fill="#074370" p-id="82260"></path><path d="M903.2 776c0 35.2-28.8 64-64 64H203.2c-35.2 0-64-28.8-64-64V293.6c0-35.2 28.8-64 64-64h636c35.2 0 64 28.8 64 64V776z" fill="#415E6D" p-id="82261"></path><path d="M839.2 797.6H203.2c-35.2 0-64-28.8-64-64V776c0 35.2 28.8 64 64 64h636c35.2 0 64-28.8 64-64v-42.4c0 35.2-28.8 64-64 64z" fill="#324D5B" p-id="82262"></path><path d="M839.2 229.6H203.2c-35.2 0-64 28.8-64 64V728h764V293.6c0-35.2-28.8-64-64-64z" fill="#EAEAEA" p-id="82263"></path><path d="M901.6 736H144c-4.8 0-8-3.2-8-8s3.2-8 8-8h757.6c4.8 0 8 3.2 8 8s-4 8-8 8z" fill="#074370" p-id="82264"></path><path d="M816 784m-24 0a24 24 0 1 0 48 0 24 24 0 1 0-48 0Z" fill="#28A5C6" p-id="82265"></path><path d="M216 784m-16 0a16 16 0 1 0 32 0 16 16 0 1 0-32 0Z" fill="#3AD0F9" p-id="82266"></path><path d="M280 784m-16 0a16 16 0 1 0 32 0 16 16 0 1 0-32 0Z" fill="#FF4848" p-id="82267"></path><path d="M344 784m-16 0a16 16 0 1 0 32 0 16 16 0 1 0-32 0Z" fill="#75B600" p-id="82268"></path><path d="M408 784m-16 0a16 16 0 1 0 32 0 16 16 0 1 0-32 0Z" fill="#FFFFFF" p-id="82269"></path><path d="M904 592h-72c-4.8 0-8-3.2-8-8s4-8 8-8h71.2c4.8 0 8 3.2 8 8s-3.2 8-7.2 8zM639.2 664c-3.2 0-6.4-2.4-8-5.6L592 523.2l-14.4 63.2c-0.8 4-4 6.4-8 6.4H391.2c-4 0-7.2-2.4-8-6.4l-21.6-119.2-17.6 73.6c-0.8 4-5.6 7.2-9.6 5.6-4-0.8-7.2-5.6-5.6-9.6L355.2 424c0.8-4 4-6.4 8-6.4s7.2 3.2 8 6.4l27.2 152h166.4L584 488.8c0.8-3.2 4-8.8 8-8.8s6.4 4.8 8 8.8l38.4 132.8 40.8-224.8c0.8-4 4-6.4 8-6.4s7.2 2.4 8 6.4L732 576h76c4.8 0 8 3.2 8 8s-3.2 8-8 8H725.6c-4 0-7.2-2.4-8-6.4l-30.4-146.4-40 218.4c-0.8 3.2-4 6.4-8 6.4 0.8 0 0.8 0 0 0zM305.6 680c-4 0-7.2-2.4-8-6.4L268 536l-15.2 50.4c-0.8 3.2-4 5.6-8 5.6H146.4c-4.8 0-8-3.2-8-8s3.2-8 8-8h92.8l22.4-74.4c0.8-3.2 4.8-5.6 8-5.6 4 0 6.4 2.4 7.2 6.4l28.8 132.8 11.2-47.2c0.8-4 5.6-7.2 9.6-5.6 4 0.8 7.2 5.6 5.6 9.6l-19.2 82.4c0 3.2-4 5.6-7.2 5.6z" fill="#074370" p-id="82270"></path><path d="M776 304h-56c-4.8 0-8-3.2-8-8s3.2-8 8-8h56c4.8 0 8 3.2 8 8s-3.2 8-8 8zM672 304H488c-4 0-8-3.2-8-8s3.2-8 8-8h184c4 0 8 3.2 8 8s-3.2 8-8 8zM424 304H224c-4.8 0-8-3.2-8-8s4-8 8-8h200c4.8 0 8 3.2 8 8s-4 8-8 8zM711.2 344H584c-4.8 0-8-3.2-8-8s3.2-8 8-8h127.2c4.8 0 8 3.2 8 8s-3.2 8-8 8zM528 344H224c-4.8 0-8-3.2-8-8s4-8 8-8h304c4.8 0 8 3.2 8 8s-4 8-8 8z" fill="#ADADAD" p-id="82271"></path><path d="M840 848H200c-40 0-72-32-72-72V296c0-40 32-72 72-72h640c40 0 72 32 72 72v480c0 40-32 72-72 72zM200 240c-31.2 0-56 24.8-56 56v480c0 31.2 24.8 56 56 56h640c31.2 0 56-24.8 56-56V296c0-31.2-24.8-56-56-56H200z" fill="#074370" p-id="82272"></path><path d="M864 553.6c-4.8 0-8-3.2-8-8v-80c0-4.8 3.2-8 8-8s8 3.2 8 8v80c0 4.8-3.2 8-8 8zM864 425.6c-4.8 0-8-3.2-8-8V312c0-22.4-17.6-40-40-40H408c-4.8 0-8-3.2-8-8s3.2-8 8-8h408c31.2 0 56 24.8 56 56v105.6c0 4.8-3.2 8-8 8zM345.6 272H224c-4.8 0-8-3.2-8-8s3.2-8 8-8h121.6c4.8 0 8 3.2 8 8s-4 8-8 8zM64 464c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32z m0-48c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zM656 176c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32z m0-48c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zM474.4 124c0-3.2-3.2-6.4-8-7.2l-15.2-2.4c-4-0.8-8.8-4.8-8.8-8.8l-2.4-15.2c-0.8-4-4-8-7.2-8s-6.4 3.2-7.2 8l-2.4 15.2c-0.8 4-4.8 8.8-8.8 8.8l-15.2 2.4c-4 0.8-8 4-8 7.2s3.2 6.4 8 7.2l15.2 2.4c4 0.8 8.8 4.8 8.8 8.8l2.4 15.2c0.8 4 4 8 7.2 8s6.4-3.2 7.2-8l2.4-16.8c0.8-4 4.8-8 8.8-8.8l14.4-0.8c5.6-1.6 8.8-4 8.8-7.2zM502.4 928c0-3.2-3.2-6.4-8-7.2l-15.2-2.4c-4-0.8-8.8-4.8-8.8-8.8l-2.4-15.2c-0.8-4-4-8-7.2-8s-6.4 3.2-7.2 8l-2.4 15.2c-0.8 4-4.8 8.8-8.8 8.8l-15.2 2.4c-4 0.8-8 4-8 7.2s3.2 6.4 8 7.2l15.2 2.4c4 0.8 8.8 4.8 8.8 8.8l2.4 15.2c0.8 4 4 8 7.2 8s6.4-3.2 7.2-8l2.4-16.8c0.8-4 4.8-8 8.8-8.8l14.4-0.8c5.6-1.6 8.8-4 8.8-7.2z" fill="#FFFFFF" p-id="82273"></path></svg>
            </span>
            <span class="nav-link-title strong-text">
                {% if lan == 'cn' %} 性能测试 {% else %} APM {% endif %}
            </span>
        </a>
    </li>
    <li class="nav-item" id="report_tab" style="margin-left: 20px;font-weight: bolder;">
        <a class="nav-link"  href="/report?lan={{ lan }}">
            <span class="nav-link-icon d-md-none d-lg-inline-block">
                <svg t="1643364122000" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="29349" width="300" height="300"><path d="M777 806.7c0 38.7-31.1 70.3-69.7 70.3H225.9c-38.7 0-69.9-31.6-69.9-70.3V174.4c0-38.7 31.2-70.4 69.9-70.4h481.4c38.7 0 69.7 31.7 69.7 70.4v632.3z" fill="#FFFFFF" p-id="29350"></path><path d="M707.3 886H225.9c-43.5 0-78.9-35.8-78.9-79.3V174.4c0-43.5 35.4-79.4 78.9-79.4h481.4c43.5 0 79.7 35.9 79.7 79.4v632.3c0 43.5-36.2 79.3-79.7 79.3zM225.9 113c-33.7 0-59.9 27.7-59.9 61.4v632.3c0 33.7 26.2 61.3 59.9 61.3h481.4c33.7 0 60.7-27.6 60.7-61.3V174.4c0-33.7-27-61.4-60.7-61.4H225.9z" fill="#282828" p-id="29351"></path><path d="M732 763.1c0 33.3-26.1 60.9-59.4 60.9H251.7c-33.3 0-59.7-27.6-59.7-60.9V226.9c0-33.3 26.4-60.9 59.7-60.9h420.9c33.3 0 59.4 27.5 59.4 60.9v536.2z" fill="#50BCFF" p-id="29352"></path><path d="M361.8 251.9H208.6c-4.9 0-8.9-4-8.9-8.9s4-8.9 8.9-8.9h153.1c4.9 0 8.9 4 8.9 8.9s-3.9 8.9-8.8 8.9zM549.2 313H208.6c-4.9 0-8.9-4-8.9-8.9s4-8.9 8.9-8.9h340.5c4.9 0 8.9 4 8.9 8.9s-3.9 8.9-8.8 8.9zM652 448.4H208.6c-4.9 0-8.9-4-8.9-8.9s4-8.9 8.9-8.9H652c4.9 0 8.9 4 8.9 8.9s-4 8.9-8.9 8.9zM588.4 515.8H208.6c-4.9 0-8.9-4-8.9-8.9s4-8.9 8.9-8.9h379.7c4.9 0 8.9 4 8.9 8.9 0.1 4.9-3.9 8.9-8.8 8.9z" fill="#282828" p-id="29353"></path><path d="M673.3 113.3c0 19.6-15.9 35.5-35.5 35.5h-346c-19.6 0-35.5-15.9-35.5-35.5v-6.7c0-19.6 15.9-35.5 35.5-35.5h346c19.6 0 35.5 15.9 35.5 35.5v6.7z" fill="#1A6DFF" p-id="29354"></path><path d="M637.8 157.6h-346c-24.5 0-44.4-19.9-44.4-44.4v-6.7c0-24.5 19.9-44.4 44.4-44.4h346c24.5 0 44.4 19.9 44.4 44.4v6.7c0 24.5-19.9 44.4-44.4 44.4zM291.9 80c-14.7 0-26.6 11.9-26.6 26.6v6.7c0 14.7 11.9 26.6 26.6 26.6h346c14.7 0 26.6-11.9 26.6-26.6v-6.7c0-14.7-11.9-26.6-26.6-26.6h-346z" fill="#282828" p-id="29355"></path><path d="M849.7 758.4c0 106.3-86.2 192.4-192.4 192.4-106.3 0-192.4-86.2-192.4-192.4C464.8 652.1 551 566 657.3 566c106.2 0 192.4 86.1 192.4 192.4z" fill="#FFFFFF" p-id="29356"></path><path d="M657.3 959.7c-111 0-201.3-90.3-201.3-201.3s90.3-201.3 201.3-201.3 201.3 90.3 201.3 201.3-90.3 201.3-201.3 201.3z m0-384.8c-101.2 0-183.5 82.3-183.5 183.5S556.1 942 657.3 942s183.6-82.3 183.6-183.6c-0.1-101.2-82.4-183.5-183.6-183.5z" fill="#282828" p-id="29357"></path><path d="M657.3 553.6v204.9h203.6c-0.2-112.7-91.2-204-203.6-204.9z" fill="#1A6DFF" p-id="29358"></path><path d="M860.9 767.3H657.3c-4.9 0-8.9-4-8.9-8.9V553.6c0-2.4 0.9-4.6 2.6-6.3 1.7-1.7 3.6-2.4 6.3-2.6 116.9 0.9 212.2 96.8 212.4 213.7 0 2.4-0.9 4.6-2.6 6.3-1.6 1.7-3.9 2.6-6.2 2.6z m-194.8-17.8h185.6C847 649.3 766.2 568 666.1 562.7v186.8z" fill="#282828" p-id="29359"></path><path d="M794.1 903.7c-2.3 0-4.6-0.9-6.3-2.6L652.1 764.7c-3.5-3.5-3.4-9.1 0-12.6 3.5-3.5 9.1-3.4 12.6 0l135.7 136.5c3.5 3.5 3.4 9.1 0 12.6-1.8 1.7-4 2.5-6.3 2.5z" fill="#282828" p-id="29360"></path></svg>
            </span>
            <span class="nav-link-title strong-text">
                {% if lan == 'cn' %} 报告管理 {% else %} Report {% endif %}
            </span>
        </a>
    </li>
</ul>
{% endblock %}

{% block ms_auto %}
{% if platform == 'Android' %}
<div class="ms-auto d-print-none  col-auto">
    <a  class="cursor-pointer"  data-bs-toggle="modal" data-bs-target="#modal-scrollable">
        <svg t="1687917727817" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2540" width="50" height="50"><path d="M861.12 596.608L786.176 678.4c-139.936-158.4-387.04-158.4-526.976 0l-74.976-81.824c179.776-203.52 497.184-203.52 676.96 0z" fill="#080808" p-id="2541"></path><path d="M1011.808 432.896l-75.328 80.544c-219.776-248.864-607.872-248.864-827.616 0l-75.328-80.544c259.616-294.4 718.624-294.4 978.24 0z" fill="#080808" p-id="2542"></path><path d="M422.784 716.128c-50.08 50.048-50.08 128.32 0 178.4 50.08 50.08 128.32 50.08 178.432 0 50.048-50.08 50.048-128.32 0-178.4-53.248-50.24-131.52-50.24-178.432 0z" fill="#FFA115" p-id="2543"></path></svg>
    </a>
</div>
<div class="ms-auto d-print-none  col-auto">
    <a class="btn btn-default" onclick="cast()">
        <svg t="1690357482122" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5413" width="128" height="128"><path d="M896 192a64 64 0 0 1 63.84 59.2L960 256v384a64 64 0 0 1-59.2 63.84L896 704h-272v64h195.2c7.04 0 12.8 5.76 12.8 12.8v38.4a12.8 12.8 0 0 1-12.8 12.8H448v-64h80v-64h-110.848v-64H896V256H256v32H192V256a64 64 0 0 1 59.2-63.84L256 192h640z m-544 128a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32h224z m-32 64H160v384h160V384z" fill="#000000" p-id="5414"></path></svg>
        {% if lan == 'cn' %} 投屏 {% else %} Cast {% endif %}
    </a>
</div>
{% endif %}
<div class="ms-auto d-print-none  col-auto">
    <a class="btn btn-default" id="debug-connect">
        <svg t="1638091545450" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="231707" width="200" height="200"><path d="M207.67511 241.617978v295.694382c0 15.532584 4.602247 31.065169 13.231461 43.721348L296.268369 676.530337c13.806742 20.134831 36.242697 32.21573 60.404494 32.21573h109.303371c24.161798 0 46.597753-12.080899 60.404494-32.21573L601.742526 581.033708c8.629213-12.65618 13.231461-28.188764 13.231461-43.721348V241.617978H207.67511z" fill="#4988FD" p-id="231708"></path><path d="M253.122301 4.026966h317.555056V241.617978H253.122301z" fill="#C5DCFA" p-id="231709"></path><path d="M344.016683 184.089888c-9.204494 0-16.683146-7.478652-16.683146-16.683146V83.41573c0-9.204494 7.478652-16.683146 16.683146-16.683146 9.204494 0 16.683146 7.478652 16.683146 16.683146v83.991012c0 9.204494-7.478652 16.683146-16.683146 16.683146zM476.906571 184.089888c-9.204494 0-16.683146-7.478652-16.683146-16.683146V83.41573c0-9.204494 7.478652-16.683146 16.683146-16.683146 9.204494 0 16.683146 7.478652 16.683146 16.683146v83.991012c0 9.204494-7.478652 16.683146-16.683146 16.683146z" fill="#FFFFFF" p-id="231710"></path><path d="M606.344773 1023.424719c-118.507865 0-214.579775-96.07191-214.579775-214.579775v-28.188764c0-12.080899 9.779775-21.860674 21.860674-21.860674 12.080899 0 21.860674 9.779775 21.860674 21.860674v28.188764c0 93.770787 76.51236 170.283146 170.283146 170.283146s170.283146-76.51236 170.283146-170.283146v-231.262922c0-12.080899 9.779775-21.860674 21.860674-21.860674 12.080899 0 21.860674 9.779775 21.860675 21.860674v231.262922c0.575281 118.507865-95.496629 214.579775-213.429214 214.579775z" fill="#C5DCFA" p-id="231711"></path><path d="M439.513312 780.65618h-52.925842c-12.65618 0-23.011236-10.355056-23.011236-23.011236v-48.898877h98.373033v48.898877c0.575281 12.65618-9.779775 23.011236-22.435955 23.011236z" fill="#2767F4" p-id="231712"></path><path d="M411.899829 604.620225c-9.204494 0-16.683146-7.478652-16.683146-16.683146V335.388764c0-9.204494 7.478652-16.683146 16.683146-16.683146 9.204494 0 16.683146 7.478652 16.683146 16.683146v252.548315c-0.575281 9.779775-7.478652 16.683146-16.683146 16.683146z" fill="#FFFFFF" p-id="231713"></path><path d="M411.899829 528.683146c-3.451685 0-7.478652-1.150562-10.355056-4.026966l-65.582022-54.651686c-4.026966-2.876404-5.752809-8.053933-5.752809-12.656179v-54.076405c0-9.204494 7.478652-16.683146 16.683146-16.683146 9.204494 0 16.683146 7.478652 16.683146 16.683146v46.597753L422.830166 499.34382c6.903371 5.752809 8.053933 16.107865 2.301124 23.586517-4.026966 4.026966-8.629213 5.752809-13.231461 5.752809z" fill="#FFFFFF" p-id="231714"></path><path d="M411.899829 480.934831c-4.602247 0-9.204494-1.725843-12.65618-5.752809-5.752809-6.903371-5.177528-17.258427 1.725843-23.586516l60.979775-51.775281V362.426966c0-9.204494 7.478652-16.683146 16.683146-16.683146 9.204494 0 16.683146 7.478652 16.683147 16.683146v44.87191c0 4.602247-2.301124 9.204494-5.752809 12.65618L422.830166 476.907865c-3.451685 2.876404-7.478652 4.026966-10.930337 4.026966z" fill="#FFFFFF" p-id="231715"></path></svg>
        {% if lan == 'cn' %} 连接 {% else %} Connect {% endif %}
    </a>
</div>
<div class="ms-auto d-print-none  col-auto">
    <div class="btn-list apm-btn-list">
        <a id="run-apm" class="btn btn-default">
            <svg t="1647757457022" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21859" width="200" height="200"><path d="M511.4 512.1m-448 0a448 448 0 1 0 896 0 448 448 0 1 0-896 0Z" fill="#006DFC" p-id="21860"></path><path d="M658.4 555.6L475.5 661.1c-33.4 19.3-75-4.8-75-43.3V406.6c0-38.5 41.7-62.6 75-43.3l182.9 105.6c33.3 19.3 33.3 67.4 0 86.7z" fill="#FFFFFF" p-id="21861"></path></svg>
            {% if lan == 'cn' %} 开始 {% else %} Start {% endif %}
        </a>
        <a id="stop-apm" onclick="stopTask()" class="btn btn-default" style="display: none">
            <svg t="1638096947956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="235254" width="200" height="200"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#EE827F" p-id="235255"></path><path d="M512 512m-443.191534 0a443.191534 443.191534 0 1 0 886.383068 0 443.191534 443.191534 0 1 0-886.383068 0Z" fill="#E64537" p-id="235256"></path><path d="M0 512C0 794.638448 229.180952 1023.8194 512 1023.8194V0C229.180952 0 0 229.180952 0 512z" fill="#FEFFFF" opacity=".1" p-id="235257"></path><path d="M477.866667 683.208466H375.647266c-1.083598 0-1.986596-0.902998-1.986596-1.986597V342.597531c0-1.083598 0.902998-1.986596 1.986596-1.986596h102.4c1.083598 0 1.986596 0.902998 1.986596 1.986596v338.443739c-0.1806 1.264198-1.083598 2.167196-2.167195 2.167196zM648.352734 683.208466h-102.4c-1.083598 0-1.986596-0.902998-1.986596-1.986597V342.597531c0-1.083598 0.902998-1.986596 1.986596-1.986596H648.352734c1.083598 0 1.986596 0.902998 1.986596 1.986596v338.443739c0 1.264198-0.902998 2.167196-1.986596 2.167196z" fill="#FFFFFF" p-id="235258"></path></svg>
            {% if lan == 'cn' %} 停止 {% else %} Stop {% endif %}
        </a>
    </div>
</div>
{% endblock %}

{% block page_body %}
<div class="row">
    <div class="apm-info" style="width: 25%">
        <div class="dropdown-menu dropdown-menu-demo">
            <h6 class="dropdown-header">{% if lan == 'cn' %} 基础信息 {% else %} Base Info {% endif %}</h6>
            <div class="input-group mb-3 mt-2" style="width: 93%;margin-left: 10px;">
                <div class="input-group-text">
                    <svg t="1638090687049" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="186695" width="200" height="200"><path d="M213.33 128.002c-11.782 0-21.328 9.546-21.328 21.328v42.672c0 11.782 9.546 21.328 21.328 21.328s21.344-9.546 21.344-21.328V149.33c0-11.782-9.562-21.328-21.344-21.328zM213.33 234.674c-11.782 0-21.328 9.546-21.328 21.328v85.328c0 11.782 9.546 21.344 21.328 21.344s21.344-9.562 21.344-21.344v-85.328c0-11.782-9.562-21.328-21.344-21.328zM213.33 384.002c-11.782 0-21.328 9.546-21.328 21.326v85.344c0 11.782 9.546 21.328 21.328 21.328s21.344-9.546 21.344-21.328v-85.344c0-11.78-9.562-21.326-21.344-21.326z" fill="#434A54" p-id="186696"></path><path d="M810.686 256.002c-11.812 0-21.376 9.546-21.376 21.328v85.344c0 11.782 9.562 21.328 21.376 21.328 11.75 0 21.312-9.546 21.312-21.328v-85.344c0-11.782-9.562-21.328-21.312-21.328zM298.674 1002.652c-35.296 0-64-28.688-64-63.998V85.33c0-35.28 28.704-63.998 64-63.998h426.636c35.312 0 64 28.718 64 63.998v853.324c0 35.31-28.688 63.998-64 63.998H298.674z" fill="#434A54" p-id="186697"></path><path d="M234.674 149.33h554.636v682.668H234.674z" fill="#5D9CEC" p-id="186698"></path><path d="M725.31 0.004H298.674c-47.14 0-85.344 38.204-85.344 85.326v853.324c0 47.124 38.204 85.342 85.344 85.342h426.636c47.156 0 85.376-38.218 85.376-85.342V85.33c0-47.122-38.22-85.326-85.376-85.326z m64 938.65c0 35.31-28.688 63.998-64 63.998H298.674c-35.296 0-64-28.688-64-63.998V85.33c0-35.28 28.704-63.998 64-63.998h426.636c35.312 0 64 28.718 64 63.998v853.324z" fill="#656D78" p-id="186699"></path><path d="M512 853.342c-35.344 0-64 28.656-64 64s28.656 63.998 64 63.998c35.342 0 64-28.654 64-63.998s-28.656-64-64-64z m0 85.312c-11.766 0-21.328-9.562-21.328-21.312 0-11.782 9.562-21.344 21.328-21.344 11.764 0 21.328 9.562 21.328 21.344 0 11.75-9.562 21.312-21.328 21.312z" fill="#656D78" p-id="186700"></path><path d="M426.672 85.33c0 11.782-9.562 21.344-21.344 21.344S384 97.112 384 85.33s9.546-21.328 21.328-21.328 21.344 9.546 21.344 21.328z" fill="#5D9CEC" p-id="186701"></path><path d="M554.688 64.002h-85.358c-11.782 0-21.328 9.546-21.328 21.328s9.546 21.344 21.328 21.344h85.358c11.75 0 21.312-9.562 21.312-21.344s-9.562-21.328-21.312-21.328z" opacity=".2" p-id="186702"></path><path d="M509.33 832.216h-122.658l128.002-682.886h122.638z" fill="#FFFFFF" opacity=".1" p-id="186703"></path></svg>
                </div>
                {% if lan == 'cn' %}
                <select  class="select-device select2-selection--single" data-placeholder="请选择一台设备"></select>
                {% else %}
                <select  class="select-device select2-selection--single" data-placeholder="Please select a device"></select>
                {% endif %}
            </div>
            <div class="input-group mb-3" style="width: 93%;margin-left: 10px;">
                <div class="input-group-text">
                    <svg t="1645171258689" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2225" width="2000" height="2000"><path d="M352 96H224c-70.4 0-128 57.6-128 128v128c0 70.4 57.6 128 128 128h192c35.2 0 64-28.8 64-64V224c0-70.4-57.6-128-128-128z m64 319.9l-0.1 0.1H224c-17 0-33-6.7-45.1-18.9S160 369 160 352V224c0-17 6.7-33 18.9-45.1S207 160 224 160h128c17 0 33 6.7 45.1 18.9S416 207 416 224v191.9zM800 96H672c-70.4 0-128 57.6-128 128v192c0 35.2 28.8 64 64 64h192c70.4 0 128-57.6 128-128V224c0-70.4-57.6-128-128-128z m64 256c0 17-6.7 33-18.9 45.1S817 416 800 416H608.1l-0.1-0.1V224c0-17 6.7-33 18.9-45.1S655 160 672 160h128c17 0 33 6.7 45.1 18.9S864 207 864 224v128zM416 544H224c-70.4 0-128 57.6-128 128v128c0 70.4 57.6 128 128 128h128c70.4 0 128-57.6 128-128V608c0-35.2-28.8-64-64-64z m0 256c0 17-6.7 33-18.9 45.1S369 864 352 864H224c-17 0-33-6.7-45.1-18.9S160 817 160 800V672c0-17 6.7-33 18.9-45.1S207 608 224 608h191.9l0.1 0.1V800zM800 544H608c-35.2 0-64 28.8-64 64v192c0 70.4 57.6 128 128 128h128c70.4 0 128-57.6 128-128V672c0-70.4-57.6-128-128-128z m64 256c0 17-6.7 33-18.9 45.1S817 864 800 864H672c-17 0-33-6.7-45.1-18.9S608 817 608 800V608.1l0.1-0.1H800c17 0 33 6.7 45.1 18.9S864 655 864 672v128z" fill="#1875F0" p-id="2226"></path></svg>
                </div>
                {% if lan == 'cn' %}
                <select  class="select-app select2-selection--single" data-placeholder="请选择一个APP"></select>
                {% else %}
                <select  class="select-app select2-selection--single" data-placeholder="Please select a package"></select>
                {% endif %}
            </div>
            {% if platform == 'Android' %}
            <div class="input-group" style="width: 93%;margin-left: 10px;">
                <div class="input-group-text">
                    <svg t="1681890999535" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5737" width="50" height="50"><path d="M512 64.303538c-247.254314 0-447.696462 200.438055-447.696462 447.696462s200.442148 447.696462 447.696462 447.696462c247.258407 0 447.696462-200.438055 447.696462-447.696462S759.258407 64.303538 512 64.303538zM512 914.925792c-222.532259 0-402.926816-180.394556-402.926816-402.926816 0-222.532259 180.394556-402.926816 402.926816-402.926816 222.527143 0 402.926816 180.394556 402.926816 402.926816C914.926816 734.531236 734.528166 914.925792 512 914.925792zM512 243.382123c-148.352793 0-268.617877 120.265084-268.617877 268.617877s120.265084 268.617877 268.617877 268.617877 268.617877-120.265084 268.617877-268.617877S660.353816 243.382123 512 243.382123z" p-id="5738" data-spm-anchor-id="a313x.7781069.0.i3" class="selected" fill="#d81e06"></path></svg>
                </div>
                {% if lan == 'cn' %}
                <select  class="select-pid select2-selection--single" data-placeholder="请选择一个进程"></select>
                {% else %}
                <select  class="select-pid select2-selection--single" data-placeholder="Please select a process"></select>
                {% endif %}
            </div>
            {% endif %}
            <div class="card" style="margin-top: 13px;">
                <div class="card-header">
                    <ul class="nav nav-tabs card-header-tabs" data-bs-toggle="tabs">
                        <li class="nav-item">
                            <a href="#tabs-apm-target" class="nav-link active" data-bs-toggle="tab">
                                {% if lan == 'cn' %} 性能指标 {% else %} APM TARGET {% endif %}
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="#tabs-device-info" class="nav-link" data-bs-toggle="tab">  
                                {% if lan == 'cn' %} 设备信息 {% else %} DEVICE INFO {% endif %}
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="card-body">
                    <div class="tab-content">
                        <div class="tab-pane active show" id="tabs-apm-target">
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="cpu_checkbox" type="checkbox" checked name="cpu"> 
                                <svg t="1702629502002" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7953" width="320" height="320"><path d="M426.666667 85.333333v85.333334h170.666666V85.333333h85.333334v85.333334h42.666666a128 128 0 0 1 128 128v42.666666h85.333334v85.333334h-85.333334v170.666666h85.333334v85.333334h-85.333334v42.666666a128 128 0 0 1-128 128h-42.666666v85.333334h-85.333334v-85.333334h-170.666666v85.333334h-85.333334v-85.333334h-42.666666a128 128 0 0 1-128-128v-42.666666H85.333333v-85.333334h85.333334v-170.666666H85.333333v-85.333334h85.333334v-42.666666a128 128 0 0 1 128-128h42.666666V85.333333h85.333334z m-128 170.666667a42.666667 42.666667 0 0 0-42.666667 42.666667v426.666666a42.666667 42.666667 0 0 0 42.666667 42.666667h426.666666a42.666667 42.666667 0 0 0 42.666667-42.666667V298.666667a42.666667 42.666667 0 0 0-42.666667-42.666667H298.666667z" fill="#000000" p-id="7954"></path><path d="M362.666667 405.333333a42.666667 42.666667 0 0 1 42.666666-42.666666h213.333334a42.666667 42.666667 0 0 1 42.666666 42.666666v213.333334a42.666667 42.666667 0 0 1-42.666666 42.666666H405.333333a42.666667 42.666667 0 0 1-42.666666-42.666666V405.333333z m85.333333 42.666667v128h128v-128h-128z" fill="#0078FF" p-id="7955"></path></svg>
                                CPU
                            </label>
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="cpufreq_checkbox" type="checkbox" checked name="cpufreq">
                                <svg t="1702629502002" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7953" width="320" height="320"><path d="M426.666667 85.333333v85.333334h170.666666V85.333333h85.333334v85.333334h42.666666a128 128 0 0 1 128 128v42.666666h85.333334v85.333334h-85.333334v170.666666h85.333334v85.333334h-85.333334v42.666666a128 128 0 0 1-128 128h-42.666666v85.333334h-85.333334v-85.333334h-170.666666v85.333334h-85.333334v-85.333334h-42.666666a128 128 0 0 1-128-128v-42.666666H85.333333v-85.333334h85.333334v-170.666666H85.333333v-85.333334h85.333334v-42.666666a128 128 0 0 1 128-128h42.666666V85.333333h85.333334z m-128 170.666667a42.666667 42.666667 0 0 0-42.666667 42.666667v426.666666a42.666667 42.666667 0 0 0 42.666667 42.666667h426.666666a42.666667 42.666667 0 0 0 42.666667-42.666667V298.666667a42.666667 42.666667 0 0 0-42.666667-42.666667H298.666667z" fill="#000000" p-id="7954"></path><path d="M362.666667 405.333333a42.666667 42.666667 0 0 1 42.666666-42.666666h213.333334a42.666667 42.666667 0 0 1 42.666666 42.666666v213.333334a42.666667 42.666667 0 0 1-42.666666 42.666666H405.333333a42.666667 42.666667 0 0 1-42.666666-42.666666V405.333333z m85.333333 42.666667v128h128v-128h-128z" fill="#0078FF" p-id="7955"></path></svg>
                                CPUFREQ
                            </label>
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="mem_checkbox" type="checkbox" checked name="mem"> 
                                <svg t="1702629683077" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13054" width="320" height="320"><path d="M798.11 959.56H225.89c-49.11 0-89.07-39.96-89.07-89.07V153.51c0-49.11 39.96-89.07 89.07-89.07h355.8c23.85 0 46.94 9.93 63.35 27.24l218.19 230.21c15.44 16.28 23.94 37.61 23.94 60.05v488.55c0 49.12-39.96 89.07-89.07 89.07zM225.89 135.7c-9.82 0-17.81 7.99-17.81 17.81v716.98c0 9.82 7.99 17.81 17.81 17.81h572.22c9.82 0 17.81-7.99 17.81-17.81V381.94c0-4.12-1.56-8.04-4.4-11.03L593.33 140.7c-3.01-3.18-7.25-5-11.64-5h-355.8z" fill="#474747" p-id="13055"></path><path d="M681.21 814.4H342.99c-21.51 0-39.01-17.5-39.01-39.01V493.42c0-21.51 17.5-39.01 39.01-39.01h338.22c21.51 0 39.01 17.5 39.01 39.01V775.4c0 21.51-17.5 39.01-39.01 39.01z m-323.78-53.44h309.35V507.85H357.43v253.11z" fill="#4F95FC" p-id="13056"></path><path d="M452.76 797.26c-14.76 0-26.72-11.96-26.72-26.72V615.36c0-14.76 11.96-26.72 26.72-26.72 14.76 0 26.72 11.96 26.72 26.72v155.18c0 14.76-11.96 26.72-26.72 26.72zM585.81 797.26c-14.76 0-26.72-11.96-26.72-26.72V615.36c0-14.76 11.96-26.72 26.72-26.72 14.76 0 26.72 11.96 26.72 26.72v155.18c0 14.76-11.96 26.72-26.72 26.72z" fill="#4F95FC" p-id="13057"></path></svg>
                                {% if lan == 'cn' %} 内存 {% else %} Memory {% endif %}
                            </label>
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="flow_checkbox" type="checkbox" checked name="Network-Data"> 
                                <svg t="1702629797008" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20256" width="320" height="320"><path d="M660.224 662.2208m-248.7296 0a248.7296 248.7296 0 1 0 497.4592 0 248.7296 248.7296 0 1 0-497.4592 0Z" fill="#FFE6D8" p-id="20257"></path><path d="M445.696 721.6128c0-137.3696 111.36-248.7296 248.7296-248.7296 79.9232 0 150.9888 37.7344 196.4544 96.3072-36.864-91.2384-126.208-155.6992-230.656-155.6992-137.3696 0-248.7296 111.36-248.7296 248.7296 0 57.4464 19.5584 110.336 52.2752 152.4224a247.42912 247.42912 0 0 1-18.0736-93.0304z" fill="#FF7B4C" p-id="20258"></path><path d="M477.4912 797.696c0-137.3696 111.36-248.7296 248.7296-248.7296 70.912 0 134.8608 29.7472 180.1216 77.4144-2.8672-19.8656-8.1408-38.9632-15.4112-57.0368-45.4656-58.624-116.5312-96.4096-196.5056-96.4096-137.3696 0-248.7296 111.36-248.7296 248.7296 0 33.0752 6.6048 64.5632 18.3296 93.3888 5.0688 6.5024 10.496 12.8 16.1792 18.7392-1.6896-11.776-2.7136-23.808-2.7136-36.096z" fill="#FE966C" p-id="20259"></path><path d="M726.2208 548.9664c-137.3696 0-248.7296 111.36-248.7296 248.7296 0 12.2368 0.9216 24.2176 2.6624 35.9936 10.8032 11.3152 22.6304 21.6576 35.3792 30.7712 6.7584-131.328 115.3536-235.776 248.3712-235.776 54.016 0 103.936 17.3056 144.6912 46.592 0.2048-4.3008 0.3584-8.704 0.3584-13.056 0-12.2368-0.9216-24.2176-2.6112-35.9936-45.312-47.5648-109.2096-77.2608-180.1216-77.2608z" fill="#FFB392" p-id="20260"></path><path d="M899.6352 729.7024c4.9152-17.4592 8.0384-35.6864 9.0112-54.528a247.48032 247.48032 0 0 0-144.7424-46.4896c-133.0176 0-241.6128 104.3968-248.3712 235.776 13.8752 9.9328 28.8256 18.5344 44.6464 25.4976 29.3888-104.6016 125.3888-181.2992 239.4112-181.2992 35.584 0 69.4272 7.5776 100.0448 21.0432z" fill="#FEC3A6" p-id="20261"></path><path d="M799.5904 708.6592c-113.9712 0-210.0224 76.6976-239.4112 181.2992 18.5344 8.1408 38.2464 14.1312 58.8288 17.5616 42.2912-77.056 124.1088-129.28 218.2144-129.28 14.08 0 27.8016 1.2288 41.2672 3.4816 8.96-16.3328 16.0768-33.7408 21.1968-52.0704-30.6688-13.4656-64.512-20.992-100.096-20.992z" fill="#FED9C4" p-id="20262"></path><path d="M511.744 930.0992c-232.9088 0-422.4-189.4912-422.4-422.4s189.4912-422.4 422.4-422.4 422.4 189.4912 422.4 422.4-189.4912 422.4-422.4 422.4z m0-762.88c-187.7504 0-340.48 152.7296-340.48 340.48s152.7296 340.48 340.48 340.48 340.48-152.7296 340.48-340.48-152.7296-340.48-340.48-340.48z" fill="#373E51" p-id="20263"></path><path d="M436.0704 706.6624c-10.752 0-21.2992-4.2496-29.184-12.1856L310.784 597.0944c-15.872-16.128-15.7184-42.0352 0.4096-57.9072 16.0768-15.872 42.0352-15.7184 57.9072 0.4096l25.9584 26.3168V348.0576c0-22.6304 18.3296-40.96 40.96-40.96s40.96 18.3296 40.96 40.96v317.6448c0 16.64-10.0352 31.5904-25.3952 37.888-5.0176 2.0992-10.2912 3.072-15.5136 3.072z" fill="#373E51" p-id="20264"></path><path d="M587.1616 706.6624c-22.6304 0-40.96-18.3296-40.96-40.96V348.0576c0-16.64 10.0352-31.5904 25.3952-37.888 15.36-6.2976 33.024-2.7136 44.6976 9.1136l96.1024 97.3824c15.872 16.0768 15.7184 42.0352-0.4096 57.9072-16.128 15.872-42.0352 15.7184-57.9072-0.4096l-25.9584-26.3168v217.8048a40.96 40.96 0 0 1-40.96 41.0112z" fill="#373E51" p-id="20265"></path></svg>
                                {% if lan == 'cn' %} 流量 {% else %} Network {% endif %}
                                {% if platform == 'Android' %}
                                <span class="ms-auto">
                                    <label class="form-check form-check-single form-switch">
                                        <input id="net-switch" class="form-check-input cursor-pointer" type="checkbox" checked name="net-switch" style="margin-right: 5px"> WIFI
                                    </label>
                                </span>
                                {% endif %}
                            </label>
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="fps_checkbox" type="checkbox" name="fps" checked>
                                <svg t="1702629928532" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27477" width="320" height="320"><path d="M163.7 749.9c-63.9 0-115.9-52-115.9-116s52-116 115.9-116c63.9 0 116 52 116 116s-52.1 116-116 116z m0-161.9c-25.4 0-46 20.6-46 46s20.6 46 46 46 46-20.6 46-46-20.6-46-46-46zM393.1 538.7c-63.9 0-116-52-116-116 0-63.9 52-115.9 116-115.9 63.9 0 115.9 52 115.9 115.9 0.1 63.9-51.9 116-115.9 116z m0-162c-25.4 0-46 20.6-46 46s20.6 46 46 46 46-20.6 46-46c0-25.3-20.6-46-46-46zM859.9 504.4c-63.9 0-115.9-52-115.9-115.9 0-63.9 52-116 115.9-116 63.9 0 116 52 116 116 0 63.9-52 115.9-116 115.9z m0-161.9c-25.4 0-46 20.6-46 46s20.6 46 46 46 46-20.6 46-46-20.6-46-46-46z" fill="#706D7E" p-id="27478"></path><path d="M220.9 611.7c-8.9 0-17.9-3.4-24.7-10.2-13.7-13.7-13.7-35.8 0-49.5l106.6-106.6c13.7-13.7 35.8-13.7 49.5 0 13.7 13.7 13.7 35.8 0 49.5L245.7 601.4c-6.9 6.9-15.8 10.3-24.8 10.3zM552.7 580c-8.9 0-17.9-3.4-24.7-10.2L441.2 483c-13.7-13.7-13.7-35.8 0-49.5 13.6-13.7 35.8-13.7 49.5 0l86.8 86.8c13.7 13.7 13.7 35.8 0 49.5-6.9 6.7-15.8 10.2-24.8 10.2zM691 592.4c-8.9 0-17.9-3.4-24.7-10.2-13.7-13.7-13.7-35.8 0-49.5L778 421c13.6-13.7 35.8-13.7 49.5 0 13.7 13.7 13.7 35.8 0 49.5L715.7 582.1c-6.8 6.9-15.8 10.3-24.7 10.3z" fill="#706D7E" p-id="27479"></path><path d="M620.1 714.8c-63.9 0-116-52-116-116s52-116 116-116c63.9 0 115.9 52 115.9 116s-52 116-115.9 116z m0-162c-25.4 0-46 20.6-46 46s20.6 46 46 46 46-20.6 46-46c0-25.3-20.6-46-46-46z" fill="#5AC0F9" p-id="27480"></path></svg>
                                {% if lan == 'cn' %} 流畅度 {% else %} FPS {% endif %}
                                {% if platform == 'Android' %}
                                <span class="ms-auto">
                                    <label class="form-check form-check-single form-switch">
                                        <input id="fps-switch" class="form-check-input cursor-pointer" type="checkbox" checked name="fps-switch" style="margin-right: 5px"> SurfaceView
                                    </label>
                                </span>
                                {% endif %}
                            </label>
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="battery_checkbox" type="checkbox" name="battery" checked> 
                                <svg t="1702629971672" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="29513" width="320" height="320"><path d="M385 228V124c0-19.3 15.7-35 35-35h184c19.3 0 35 15.7 35 35v104H385z" fill="#8F8D94" p-id="29514"></path><path d="M604 114c5.5 0 10 4.5 10 10v79H410v-79c0-5.5 4.5-10 10-10h184m0-50H420c-33.1 0-60 26.9-60 60v129h304V124c0-33.1-26.9-60-60-60z" fill="#504D59" p-id="29515"></path><path d="M410 139h203.5v21H410z" fill="#6F6D75" p-id="29516"></path><path d="M262 935c-35.8 0-65-29.2-65-65V250c0-35.8 29.2-65 65-65h500c35.8 0 65 29.2 65 65v620c0 35.8-29.2 65-65 65H262z" fill="#8BEF99" p-id="29517"></path><path d="M762 210c10.6 0 20.6 4.2 28.2 11.8 7.6 7.6 11.8 17.6 11.8 28.2v620c0 10.6-4.2 20.6-11.8 28.2-7.6 7.6-17.6 11.8-28.2 11.8H262c-10.6 0-20.6-4.2-28.2-11.8-7.6-7.6-11.8-17.6-11.8-28.2V250c0-10.6 4.2-20.6 11.8-28.2S251.4 210 262 210h500m0-50H262c-49.5 0-90 40.5-90 90v620c0 49.5 40.5 90 90 90h500c49.5 0 90-40.5 90-90V250c0-49.5-40.5-90-90-90z" fill="#504D59" p-id="29518"></path><path d="M762 210h-26.4v460.6c0 77.2-62.8 140-140 140H541l151.4-239.5-166-43L470 351.7l-140.9 272 137 65.5 21.2 121.5H222V870c0 22.1 17.9 40 40 40h500c22.1 0 40-17.9 40-40V250c0-22.1-17.9-40-40-40z" fill="#6DC674" p-id="29519"></path><path d="M517.3 656.4l-156-54.1 108.8-227.6 35.7 165.4 154 41.1-144.1 226.1z" fill="#FFCE00" p-id="29520"></path><path d="M464.7 420.8l24.5 113.5 3.9 17.9 17.7 4.7 125.4 33.4-105 164.7 0.9-87.6 0.2-21.6-20.4-7.1-130-45.1 82.8-172.8m10.8-92.2L340.5 611l161.7 56.1-2.1 192.5L683.5 572l-165-44-43-199.4z" fill="#504D59" p-id="29521"></path><path d="M197 269v-19c0-35.8 29.2-65 65-65h500c35.8 0 65 29.2 65 65v19H197z" fill="#A9B7AA" p-id="29522"></path><path d="M762 210c10.6 0 20.6 4.2 28.2 11.8 6.1 6.1 10.1 13.9 11.3 22.2h-579c1.3-8.3 5.2-16.1 11.3-22.2 7.6-7.6 17.6-11.8 28.2-11.8h500m0-50H262c-49.5 0-90 40.5-90 90v44h680v-44c0-49.5-40.5-90-90-90z" fill="#504D59" p-id="29523"></path></svg>
                                {% if lan == 'cn' %} 电池 {% else %} Battery {% endif %}
                            </label>
                            {% if platform == 'iOS' or platform == 'Android'%}
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="gpu_checkbox" type="checkbox" checked name="gpu"> 
                                <svg t="1702629555656" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8114" width="320" height="320"><path d="M809.2 525.5h120.5c13.1 0 23.6-10.6 23.6-23.6 0-13-10.6-23.6-23.6-23.6H809.2c-4.8 0-9.1 1.8-12.8 4.3v-71.5c0-4.9-0.7-9.6-1.4-14.4 4 3.1 8.8 5.3 14.3 5.3h120.5c13.1 0 23.6-10.6 23.6-23.6 0-13-10.6-23.6-23.6-23.6H809.2c-10.4 0-18.9 6.8-22.1 16.1-15.1-32-47.5-54.3-85.2-54.3H409c-52.2 0-94.5 42.3-94.5 94.5v305.3c0 33.1 17 62.1 42.7 78.9-3.7 4.2-6.1 9.5-6.1 15.5v123.6c0 13 10.6 23.6 23.6 23.6 13.1 0 23.6-10.6 23.6-23.6V810.8c0-0.4-0.2-0.7-0.2-1.1 3.6 0.4 7.1 1.1 10.9 1.1h62.6v123.6c0 13 10.6 23.6 23.6 23.6s23.6-10.6 23.6-23.6V810.8H592v123.6c0 13 10.6 23.6 23.6 23.6 13.1 0 23.6-10.6 23.6-23.6V810.8h62.6c3.7 0 7.3-0.7 10.9-1.1 0 0.4-0.2 0.7-0.2 1.1v123.6c0 13 10.6 23.6 23.6 23.6 13.1 0 23.6-10.6 23.6-23.6V810.8c0-6-2.4-11.4-6.1-15.5 14.5-9.5 26-22.9 33.4-38.7 3.2 9.3 11.7 16.1 22.1 16.1h120.5c13.1 0 23.6-10.6 23.6-23.6 0-13-10.6-23.6-23.6-23.6H809.2c-5.5 0-10.3 2.2-14.3 5.3 0.7-4.7 1.4-9.4 1.4-14.4v-71.5c3.7 2.5 8 4.3 12.8 4.3h120.5c13.1 0 23.6-10.6 23.6-23.6 0-13-10.6-23.6-23.6-23.6H809.2c-4.8 0-9.1 1.8-12.8 4.3v-84.9c3.7 2.3 8 4.1 12.8 4.1z" fill="#4DBBF7" p-id="8115"></path><path d="M585 384.4c13 0 23.6 10.6 23.6 23.6v187.8c0 13-10.6 23.6-23.6 23.6H405.4c-13 0-23.6-10.6-23.6-23.6V408c0-13 10.6-23.6 23.6-23.6H585m0-47.2H405.4c-39.1 0-70.9 31.7-70.9 70.9v187.8c0 39.1 31.7 70.9 70.9 70.9H585c39.1 0 70.9-31.7 70.9-70.9V408c-0.1-39.1-31.8-70.8-70.9-70.8z" fill="" p-id="8116"></path><path d="M893 463.8c13.1 0 23.6-10.6 23.6-23.6S906 416.6 893 416.6H776.3v-76.3H893c13.1 0 23.6-10.6 23.6-23.6S906.1 293 893 293H774.8c-6.3-39.1-36.5-70.2-75.3-77.6V107.6c0-13-10.6-23.6-23.6-23.6s-23.6 10.6-23.6 23.6v106h-73.2v-106c0-13-10.6-23.6-23.6-23.6-13.1 0-23.6 10.6-23.6 23.6v106h-73.2v-106c0-13-10.6-23.6-23.6-23.6s-23.6 10.6-23.6 23.6v106h-73.2v-106c0-13-10.6-23.6-23.6-23.6s-23.6 10.6-23.6 23.6v107.8c-38.8 7.4-68.9 38.4-75.2 77.6h-113c-13.1 0-23.6 10.6-23.6 23.6s10.6 23.6 23.6 23.6h111.2v76.3H102.9c-13.1 0-23.6 10.6-23.6 23.6s10.6 23.6 23.6 23.6h111.2V540H102.9c-13.1 0-23.6 10.6-23.6 23.6s10.6 23.6 23.6 23.6h111.2v76.3H102.9c-13.1 0-23.6 10.6-23.6 23.6 0 13 10.6 23.6 23.6 23.6h112.7c6.3 39.1 36.5 70.2 75.2 77.6v107.8c0 13 10.6 23.6 23.6 23.6s23.6-10.6 23.6-23.6v-106h73.2v106c0 13 10.6 23.6 23.6 23.6s23.6-10.6 23.6-23.6v-106h73.2v106c0 13 10.6 23.6 23.6 23.6 13.1 0 23.6-10.6 23.6-23.6v-106H652v106c0 13 10.6 23.6 23.6 23.6s23.6-10.6 23.6-23.6V788.4c38.8-7.4 68.9-38.4 75.3-77.6H893c13.1 0 23.6-10.6 23.6-23.6 0-13-10.6-23.6-23.6-23.6H776.3v-76.3H893c13.1 0 23.6-10.6 23.6-23.6S906 540.1 893 540.1H776.3v-76.3H893zM729.1 695.7c0 26.1-21.2 47.2-47.2 47.2H308.6c-26 0-47.2-21.2-47.2-47.2V308.1c0-26.1 21.2-47.2 47.2-47.2h373.2c26 0 47.2 21.2 47.2 47.2v387.6z" fill="" p-id="8117"></path><path d="M518.1 437.3h33.1v14.5h-33.1z" fill="#FFD939" p-id="8118"></path><path d="M574.8 413.6h-80.3v61.8h80.3v-61.8z" fill="" p-id="8119"></path></svg>
                                GPU
                            </label>
                            {% endif %}
                            {% if platform == 'Android' %}
                            <label class="dropdown-item cursor-pointer"><input class="form-check-input m-0 me-2 cursor-pointer" id="mem_detail_checkbox" type="checkbox"  name="mem_detail"> 
                                <svg t="1702629683077" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13054" width="320" height="320"><path d="M798.11 959.56H225.89c-49.11 0-89.07-39.96-89.07-89.07V153.51c0-49.11 39.96-89.07 89.07-89.07h355.8c23.85 0 46.94 9.93 63.35 27.24l218.19 230.21c15.44 16.28 23.94 37.61 23.94 60.05v488.55c0 49.12-39.96 89.07-89.07 89.07zM225.89 135.7c-9.82 0-17.81 7.99-17.81 17.81v716.98c0 9.82 7.99 17.81 17.81 17.81h572.22c9.82 0 17.81-7.99 17.81-17.81V381.94c0-4.12-1.56-8.04-4.4-11.03L593.33 140.7c-3.01-3.18-7.25-5-11.64-5h-355.8z" fill="#474747" p-id="13055"></path><path d="M681.21 814.4H342.99c-21.51 0-39.01-17.5-39.01-39.01V493.42c0-21.51 17.5-39.01 39.01-39.01h338.22c21.51 0 39.01 17.5 39.01 39.01V775.4c0 21.51-17.5 39.01-39.01 39.01z m-323.78-53.44h309.35V507.85H357.43v253.11z" fill="#4F95FC" p-id="13056"></path><path d="M452.76 797.26c-14.76 0-26.72-11.96-26.72-26.72V615.36c0-14.76 11.96-26.72 26.72-26.72 14.76 0 26.72 11.96 26.72 26.72v155.18c0 14.76-11.96 26.72-26.72 26.72zM585.81 797.26c-14.76 0-26.72-11.96-26.72-26.72V615.36c0-14.76 11.96-26.72 26.72-26.72 14.76 0 26.72 11.96 26.72 26.72v155.18c0 14.76-11.96 26.72-26.72 26.72z" fill="#4F95FC" p-id="13057"></path></svg>
                                Memory Detail
                            </label>
                            {% endif %}
                        </div>
                        <div class="tab-pane" id="tabs-device-info">
                            <div class="mb-2">
                                <strong>{% if lan == 'cn' %} 品牌 {% else %} Brand {% endif %}:</strong> <lable id="brand"></lable>
                            </div>
                            <div class="mb-2">
                                <strong>{% if lan == 'cn' %} 设备名称 {% else %} Device Name {% endif %}:</strong> <lable id="device_name"></lable>
                            </div>
                            <div class="mb-2">
                                <strong>{% if lan == 'cn' %} CPU核心数 {% else %} CPU Info {% endif %}:</strong> <lable id="cpuinfo"></lable>
                            </div>
                            <div class="mb-2">
                                <strong>{% if lan == 'cn' %} 系统版本 {% else %} Os Version {% endif %}:</strong> <lable id="os_version"></lable>
                            </div>
                            <div class="mb-2">
                                <strong>{% if lan == 'cn' %} 序列号 {% else %} Serial Number {% endif %}:</strong> <lable id="serialno"></lable>
                            </div>
                            <div class="mb-2">
                                <strong>{% if lan == 'cn' %} WiFi地址 {% else %} WiFi Address {% endif %}:</strong> <lable id="wifiadr"></lable>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <a class="dropdown-item" style="margin-top: 10px;">
                <svg t="1689735902363" class="icon me-2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1518" width="320" height="320"><path d="M512.9 503.4m-184.8 0a184.8 184.8 0 1 0 369.6 0 184.8 184.8 0 1 0-369.6 0Z" fill="#03BD61" p-id="1519"></path><path d="M512 79.3C273.4 79.3 79.3 273.4 79.3 512S273.4 944.7 512 944.7 944.7 750.6 944.7 512 750.6 79.3 512 79.3z m0 790.9c-197.5 0-358.2-160.7-358.2-358.2S314.5 153.8 512 153.8 870.2 314.5 870.2 512 709.5 870.2 512 870.2z" fill="#23202D" p-id="1520"></path><path d="M753.7 467.5H548.5V244.2c0-20.6-16.7-37.2-37.2-37.2S474 223.6 474 244.2v260.6c0 20.6 16.7 37.2 37.2 37.2h242.5c20.6 0 37.2-16.7 37.2-37.2s-16.6-37.3-37.2-37.3z" fill="#23202D" p-id="1521"></path></svg>
                {% if lan == 'cn' %} 启动时间 {% else %} Start-up Time {% endif %}
                <span class="ms-auto badge" data-bs-toggle="offcanvas" href="#offcanvas-startup-time" role="button" aria-controls="offcanvas-startup-time">
                    OPEN
                </span>
            </a>
            {% if platform == 'Android' %}
            <a class="dropdown-item" style="margin-top: 10px;">
                <svg t="1689735866582" class="icon me-2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4419" width="100" height="100"><path d="M513.2288 509.3888m-456.8576 0a456.8576 456.8576 0 1 0 913.7152 0 456.8576 456.8576 0 1 0-913.7152 0Z" fill="#529FF4" p-id="4420"></path><path d="M561.3056 466.8928l-71.3216-40.96a49.7664 49.7664 0 0 0-74.5984 43.0592v82.3296a49.7664 49.7664 0 0 0 49.7152 49.8176 50.0224 50.0224 0 0 0 24.8832-6.7072l71.3216-40.96a49.7664 49.7664 0 0 0 0-86.1696z m-20.48 50.688l-71.3216 40.96a8.8064 8.8064 0 0 1-13.1584-7.6288V468.7872a8.448 8.448 0 0 1 4.4544-7.5776 8.6528 8.6528 0 0 1 4.4032-1.2288 8.5504 8.5504 0 0 1 4.352 1.2288l71.3216 40.96a8.7552 8.7552 0 0 1 0 15.36z" fill="#FFFFFF" p-id="4421"></path><path d="M803.328 355.4816a54.4768 54.4768 0 0 0-54.9888 0l-21.6576 12.4928v-8.8064a97.28 97.28 0 0 0-97.28-97.28H315.4432a97.28 97.28 0 0 0-97.28 97.28v300.3904a97.28 97.28 0 0 0 97.28 97.28h313.856a97.28 97.28 0 0 0 97.28-97.28v-15.7696l21.6576 12.4928a54.9888 54.9888 0 0 0 82.4832-47.616V403.0976a54.4768 54.4768 0 0 0-27.392-47.616z m-117.76 304.0768a56.32 56.32 0 0 1-56.32 56.32H315.4432a56.32 56.32 0 0 1-56.32-56.32V359.168a56.32 56.32 0 0 1 56.32-56.32h313.856a56.32 56.32 0 0 1 56.32 56.32v300.3904z m104.1408-50.8928a14.0288 14.0288 0 0 1-21.0432 12.1856l-42.1376-24.3712V415.2832l42.1376-24.32a14.0288 14.0288 0 0 1 21.0432 12.1344z" fill="#FFFFFF" p-id="4422"></path><path d="M341.8112 351.488A31.8464 31.8464 0 1 0 373.76 383.2832a31.7952 31.7952 0 0 0-31.9488-31.7952z" fill="#FFFFFF" p-id="4423"></path></svg>
                {% if lan == 'cn' %} 屏幕录制 {% else %} Record Screen {% endif %}
                <span class="ms-auto">
                    <label class="form-check form-check-single form-switch">
                        <input id="record-switch" class="form-check-input cursor-pointer" type="checkbox"  name="record-switch" style="margin-right: 5px">
                    </label>
                </span>
            </a>

            <a class="dropdown-item" style="margin-top: 10px;">
                <svg t="1657093102367" class="icon me-2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27860" width="2000" height="2000"><path d="M938.362 256.2V149.626c0-23.576-19.11-42.654-42.652-42.654H43.046C19.502 106.972 0.392 126.05 0.392 149.626V256.2h937.97z" fill="#E6E9ED" p-id="27861"></path><path d="M792.164 831.75H0.392V192.25h937.97v446.306z" fill="#656D78" p-id="27862"></path><path d="M85.67 149.626c0 11.772-9.526 21.296-21.328 21.296-11.74 0-21.294-9.524-21.294-21.296S52.602 128.3 64.342 128.3c11.802 0 21.328 9.556 21.328 21.326z" fill="#ED5564" p-id="27863"></path><path d="M149.62 149.626c0 11.772-9.524 21.296-21.326 21.296-11.742 0-21.296-9.524-21.296-21.296S116.55 128.3 128.292 128.3c11.804 0 21.328 9.556 21.328 21.326z" fill="#FFCE54" p-id="27864"></path><path d="M213.568 149.626c0 11.772-9.524 21.296-21.326 21.296-11.74 0-21.294-9.524-21.294-21.296S180.502 128.3 192.242 128.3c11.802 0 21.326 9.556 21.326 21.326z" fill="#A0D468" p-id="27865"></path><path d="M746.512 277.496H106.996c-11.772 0-21.326 9.554-21.326 21.326s9.554 21.328 21.326 21.328h639.516c11.74 0 21.294-9.556 21.294-21.328s-9.554-21.326-21.294-21.326z" fill="#FC6E51" p-id="27866"></path><path d="M106.996 405.426h341.046c11.802 0 21.326-9.554 21.326-21.328 0-11.772-9.524-21.326-21.326-21.326H106.996c-11.772 0-21.326 9.554-21.326 21.326 0 11.774 9.554 21.328 21.326 21.328z" fill="#AC92EB" p-id="27867"></path><path d="M575.958 448.05H106.996c-11.772 0-21.326 9.556-21.326 21.328s9.554 21.296 21.326 21.296h468.962c11.8 0 21.294-9.524 21.294-21.296s-9.492-21.328-21.294-21.328z" fill="#48CFAD" p-id="27868"></path><path d="M106.996 575.952H405.42c11.772 0 21.326-9.556 21.326-21.328s-9.554-21.296-21.326-21.296H106.996c-11.772 0-21.326 9.526-21.326 21.296s9.554 21.328 21.326 21.328z" fill="#5D9CEC" p-id="27869"></path><path d="M615.678 669.22c8.618 0 16.734-5.278 19.984-13.832 4.122-11.024-1.5-23.326-12.492-27.45-41.03-15.392-47.336-54.708-47.336-55.112a21.332 21.332 0 0 0-24.232-17.956c-11.662 1.716-19.688 12.552-17.97 24.2 0.376 2.624 10.242 64.668 74.55 88.776 2.5 0.938 4.996 1.374 7.496 1.374zM959.534 917.028c1 0 2.06-0.094 3.122-0.25 11.68-1.716 19.674-12.552 17.988-24.2-0.376-2.624-10.242-64.668-74.566-88.776-11.054-4.152-23.296 1.438-27.48 12.458-4.122 11.024 1.5 23.326 12.492 27.448 41.03 15.394 47.336 54.708 47.398 55.114a21.28 21.28 0 0 0 21.046 18.206zM448.042 618.572H106.996c-11.772 0-21.326 9.554-21.326 21.328 0 11.772 9.554 21.326 21.326 21.326h341.046c11.802 0 21.326-9.554 21.326-21.326a21.312 21.312 0 0 0-21.326-21.328z" fill="#FFCE54" p-id="27870"></path><path d="M277.52 703.85H106.996c-11.772 0-21.326 9.554-21.326 21.328 0 11.772 9.554 21.294 21.326 21.294h170.524c11.772 0 21.326-9.524 21.326-21.294 0-11.774-9.554-21.328-21.326-21.328z" fill="#ED5564" p-id="27871"></path><path d="M1002.312 746.472H533.318a21.28 21.28 0 0 1-21.294-21.294c0-11.774 9.524-21.328 21.294-21.328h468.994c11.74 0 21.294 9.554 21.294 21.328 0.002 11.772-9.554 21.294-21.294 21.294zM725.592 555.53a21.332 21.332 0 0 1-18.298-10.368l-64.388-107.478c-5.994-10.086-2.746-23.202 7.372-29.228a21.276 21.276 0 0 1 29.226 7.338l64.324 107.478c6.058 10.086 2.81 23.17-7.306 29.228a21.286 21.286 0 0 1-10.93 3.03zM810.212 555.53c-3.686 0-7.496-0.968-10.93-3.03-10.054-6.058-13.364-19.142-7.306-29.26l64.324-107.446a21.278 21.278 0 0 1 29.228-7.338c10.118 6.026 13.364 19.11 7.368 29.228l-64.324 107.478c-3.996 6.65-11.116 10.368-18.36 10.368zM920.002 669.22c-8.62 0-16.738-5.278-19.922-13.832-4.184-11.024 1.436-23.326 12.426-27.45 41.094-15.392 47.34-54.708 47.402-55.112 1.686-11.648 12.55-19.674 24.168-17.956 11.68 1.716 19.734 12.552 17.986 24.2-0.376 2.624-10.242 64.668-74.568 88.776a20.884 20.884 0 0 1-7.492 1.374zM575.958 917.028c-1 0-2.062-0.094-3.124-0.25-11.616-1.716-19.672-12.552-17.984-24.2 0.438-2.624 10.242-64.668 74.566-88.776 11.054-4.152 23.356 1.438 27.478 12.458 4.124 11.024-1.436 23.326-12.49 27.448-41.032 15.394-47.276 54.708-47.338 55.114-1.56 10.586-10.68 18.206-21.108 18.206z" fill="#FFCE54" p-id="27872"></path><path d="M938.236 682.524c0 129.524-48.71 234.504-170.43 234.504-121.716 0-170.43-104.98-170.43-234.504 0-129.494 63.39-191.85 170.43-191.85 107.044-0.002 170.43 62.356 170.43 191.85z" fill="#ED5564" p-id="27873"></path><path d="M746.512 915.872c6.806 0.75 13.928 1.156 21.294 1.156 7.372 0 14.49-0.406 21.296-1.156v-297.3h-42.592v297.3z" fill="#DA4453" p-id="27874"></path><path d="M603.56 618.572h328.494c-18.298-86.12-76.626-127.9-164.248-127.9-87.616 0-145.946 41.782-164.246 127.9z" fill="#DA4453" p-id="27875"></path></svg>
                {% if lan == 'cn' %} 错误日志 {% else %} Error Log {% endif %}
                <span class="ms-auto badge" data-bs-toggle="offcanvas" href="#offcanvasBottom" role="button" aria-controls="offcanvasBottom">
                    OPEN
                </span>
            </a>
            {% endif %}
            
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" style="margin-top: 10px;">
                <input type="file" class="form-control" id="app-file" accept=".apk,.ipa"/>
            </a>
            <strong style="margin-top: 5px;margin-left: 140px;">{% if lan == 'cn' %} 或 {% else %} OR {% endif %}</strong>
            <a class="dropdown-item" >
                {% if lan == 'cn' %}
                <input type="text" class="app-link form-control" name="example-text-input"  placeholder="请输入文件链接">
                {% else %}
                <input type="text" class="app-link form-control" name="example-text-input"   placeholder="Input file link">
                {% endif %}
            </a>
            <a class="dropdown-item" >
                <button type="button" onclick="install()" class="btn btn-default ms-auto">
                    {% if lan == 'cn' %} 安装 {% else %} Install {% endif %}
                </button>
            </a>
            
        </div>
    </div>
    <div class="apm-data mt-1" style="width: 75%;">
        {% if platform == 'Android' %}
        <div id="fps" class="mb-3 fps" style="min-width:400px;height:300px"></div>
        <div id="mem_android"  class="mb-3 mem" style="min-width:400px;height:310px"></div>
        <div id="mem_detail"   class="mb-3 mem_detail" style="min-width:400px;height:310px;display: none;"></div>
        <div id="battery_android" class="mb-3 battery" style="min-width:400px;height:310px"></div>
        {% else %}
        <div id="mem_ios"  class="mb-3 mem" style="min-width:400px;height:310px"></div>
        <div id="fps_ios" class="mb-3 fps" style="min-width:400px;height:310px"></div>
        <div id="battery_ios" class="mb-3 battery" style="min-width:400px;height:310px"></div>
        {% endif %}
        <div id="cpu" class="mb-3 cpu" style="min-width:400px;height:310px"></div>
        <div id="cpufreq" class="mb-3 cpufreq" style="min-width:400px;height:310px"></div>
        <div id="gpu" class="mb-3 gpu" style="min-width:400px;height:310px"></div>
        <div id="network" class="Network-Data mb-3" style="min-width:400px;height:310px"></div>
    </div>
</div>
<div class="offcanvas offcanvas-bottom layout-boxed" tabindex="-1" id="offcanvasBottom" aria-labelledby="offcanvasBottomLabel" style="height: 90%">
    <div class="offcanvas-header">
      <h2 class="offcanvas-title" id="offcanvasBottomLabel">Error Log</h2>
      <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
    </div>
    <div class="offcanvas-body">
        <div class="btn-list logcat-btn-list">
            <a id="run-logcat" class="btn btn-default" onclick="startLogcat()">
                <svg t="1647757457022" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21859" width="200" height="200"><path d="M511.4 512.1m-448 0a448 448 0 1 0 896 0 448 448 0 1 0-896 0Z" fill="#006DFC" p-id="21860"></path><path d="M658.4 555.6L475.5 661.1c-33.4 19.3-75-4.8-75-43.3V406.6c0-38.5 41.7-62.6 75-43.3l182.9 105.6c33.3 19.3 33.3 67.4 0 86.7z" fill="#FFFFFF" p-id="21861"></path></svg>
                {% if lan == 'cn' %} 开始 {% else %} Start {% endif %}
            </a>
            <a id="stop-logcat"  class="btn btn-default" style="display: none" onclick="stopLogcat()">
                <svg t="1638096947956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="235254" width="200" height="200"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#EE827F" p-id="235255"></path><path d="M512 512m-443.191534 0a443.191534 443.191534 0 1 0 886.383068 0 443.191534 443.191534 0 1 0-886.383068 0Z" fill="#E64537" p-id="235256"></path><path d="M0 512C0 794.638448 229.180952 1023.8194 512 1023.8194V0C229.180952 0 0 229.180952 0 512z" fill="#FEFFFF" opacity=".1" p-id="235257"></path><path d="M477.866667 683.208466H375.647266c-1.083598 0-1.986596-0.902998-1.986596-1.986597V342.597531c0-1.083598 0.902998-1.986596 1.986596-1.986596h102.4c1.083598 0 1.986596 0.902998 1.986596 1.986596v338.443739c-0.1806 1.264198-1.083598 2.167196-2.167195 2.167196zM648.352734 683.208466h-102.4c-1.083598 0-1.986596-0.902998-1.986596-1.986597V342.597531c0-1.083598 0.902998-1.986596 1.986596-1.986596H648.352734c1.083598 0 1.986596 0.902998 1.986596 1.986596v338.443739c0 1.264198-0.902998 2.167196-1.986596 2.167196z" fill="#FFFFFF" p-id="235258"></path></svg>
                {% if lan == 'cn' %} 停止 {% else %} Stop {% endif %}
            </a>
            <a id="logcat-copy" class="btn"  onclick="cppyLogcat()">
                <svg t="1681097872350" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14723" width="50" height="50"><path d="M744.296296 128a151.703704 151.703704 0 0 1 151.703704 151.703704v344.613926a75.851852 75.851852 0 0 1-75.851852 75.851851h-38.589629V373.210074a130.787556 130.787556 0 0 0-130.768593-130.768593L323.830519 242.422519V203.851852a75.851852 75.851852 0 0 1 75.851851-75.851852h344.613926z m-93.50637 179.825778a65.384296 65.384296 0 0 1 65.384296 65.384296v10.467556a75.851852 75.851852 0 0 0-72.059259-75.757037l-3.792593-0.094815h10.467556z" fill="#0CCA8A" fill-opacity=".5" p-id="14724"></path><path d="M144.004741 307.825778m75.851852 0l420.465777 0q75.851852 0 75.851852 75.851852l0 420.465777q0 75.851852-75.851852 75.851852l-420.465777 0q-75.851852 0-75.851852-75.851852l0-420.465777q0-75.851852 75.851852-75.851852Z" fill="#0CCA8A" p-id="14725"></path></svg>
                {% if lan == 'cn' %} 复制 {% else %} Copy {% endif %}
            </a>
            <a id="logcat-clear" class="btn" onclick="clearLogcat()">
                <svg t="1681097907668" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15706" width="50" height="50"><path d="M274.5344 582.0928h480.9728v265.0624H274.5344z" fill="#D9FFEC" p-id="15707"></path><path d="M852.6336 539.9552H177.408c-43.9296 0-79.6672-35.7376-79.6672-79.6672V335.8208c0-43.9296 35.7376-79.6672 79.6672-79.6672h159.8976V175.7184c0-48.5376 39.4752-88.064 88.064-88.064h179.3536c48.5376 0 88.064 39.4752 88.064 88.064v80.4864h159.8976c43.9296 0 79.6672 35.7376 79.6672 79.6672v124.5184c-0.0512 43.8784-35.7888 79.5648-79.7184 79.5648z m-672.9728-81.92h670.72V338.1248H651.776c-22.6304 0-40.96-18.3296-40.96-40.96V175.7184c0-3.3792-2.7648-6.144-6.144-6.144H425.3696c-3.3792 0-6.144 2.7648-6.144 6.144v121.4464c0 22.6304-18.3296 40.96-40.96 40.96H179.6608v119.9104z" fill="#34333A" p-id="15708"></path><path d="M390.5536 889.9072c-22.6304 0-40.96-18.3296-40.96-40.96v-173.6704c0-22.6304 18.3296-40.96 40.96-40.96s40.96 18.3296 40.96 40.96v173.6704c0 22.6304-18.3296 40.96-40.96 40.96z" fill="#3AD285" p-id="15709"></path><path d="M797.7472 932.1472H232.2944c-53.1456 0-96.3584-43.2128-96.3584-96.3584v-255.9488h81.92v255.9488c0 7.9872 6.5024 14.4384 14.4384 14.4384H797.696c7.9872 0 14.4384-6.5024 14.4384-14.4384v-255.9488h81.92v255.9488c0.0512 53.0944-43.1616 96.3584-96.3072 96.3584z" fill="#34333A" p-id="15710"></path></svg>
                {% if lan == 'cn' %} 清除 {% else %} Clear {% endif %}
            </a>
        </div>
        <div class="mt-2" id="logcat-content" style="color: rgba(214, 39, 8, 0.849);"></div>
    </div>
  </div>
<div class="offcanvas offcanvas-bottom layout-boxed" tabindex="-1" id="offcanvas-startup-time" aria-labelledby="offcanvasBottomLabel" style="height: 90%">
    <div class="offcanvas-header">
      <h2 class="offcanvas-title" id="offcanvasBottomLabel">Start-up Time</h2>
      <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
    </div>
    <div class="offcanvas-body">
        <div class="row">
            {% if platform == 'Android' %}
            <div class="col-auto">
                <div class="input-group" style="width:550px">
                    <span class="input-group-text">
                      Activity
                    </span>
                    <input type="text" id="activity" class="form-control"  placeholder="Input activity"  autocomplete="off">
                    <a onclick="getCurActivity()" class="input-group-text" style="cursor: pointer;color: rgb(0, 132, 255);">
                      <strong>Get current activity</strong>
                    </a>
                </div>
            </div>
            {% endif %}
            <div class="col-auto">
                {% if platform == 'Android' %}
                <a onclick="getStartupTimeByAndroid()" class="btn btn-default">
                    <svg t="1647757457022" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21859" width="200" height="200"><path d="M511.4 512.1m-448 0a448 448 0 1 0 896 0 448 448 0 1 0-896 0Z" fill="#006DFC" p-id="21860"></path><path d="M658.4 555.6L475.5 661.1c-33.4 19.3-75-4.8-75-43.3V406.6c0-38.5 41.7-62.6 75-43.3l182.9 105.6c33.3 19.3 33.3 67.4 0 86.7z" fill="#FFFFFF" p-id="21861"></path></svg>
                    {% if lan == 'cn' %} 开始 {% else %} Start {% endif %}
                </a>
                {% else %}
                <a onclick="getStartupTimeByiOS()" class="btn btn-default">
                    <svg t="1647757457022" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21859" width="200" height="200"><path d="M511.4 512.1m-448 0a448 448 0 1 0 896 0 448 448 0 1 0-896 0Z" fill="#006DFC" p-id="21860"></path><path d="M658.4 555.6L475.5 661.1c-33.4 19.3-75-4.8-75-43.3V406.6c0-38.5 41.7-62.6 75-43.3l182.9 105.6c33.3 19.3 33.3 67.4 0 86.7z" fill="#FFFFFF" p-id="21861"></path></svg>
                    {% if lan == 'cn' %} 开始 {% else %} Start {% endif %}
                </a>
                <span class="form-help" style="margin-left: 10px;" data-bs-toggle="popover" data-bs-placement="top" data-bs-html="true" data-bs-content="
                If no results are returned, please reinstall py-ios-device [pip install py-ios-device].
                <p class='mb-0'><a href='https://github.com/YueChen-C/py-ios-device' target='_blank'>Documentation</a></p>">?</span> 
                {% endif %}
            </div>
        </div>
        <pre class="mt-2" id="startup-time-content"></pre>
    </div>
  </div>
<div class="modal modal-blur fade" style="margin-top: 20px;margin-right: 20px;" id="modal-scrollable" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog  modal-full-width modal-dialog-centered modal-dialog-scrollable" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Connect to a Android device over Wi-Fi</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
            <iframe src="https://adbshell.com/commands/adb-connect" width="100%" height="1500px"></iframe>
        </div>
        </div>
      </div>
    </div>
{% endblock %}

{% block js %}

<script>
    var stop = false; // 任务状态
    var corenum = 0

    function ruteCheck(){
        if(['Android','iOS'].indexOf(platform) === -1 || platform && ['cn','en'].indexOf(lan) === -1 && lan){
            this.location.href = '/?platform=Android&lan=cn';
        }
    }

    $(document).ready(function() {

        ruteCheck();

        $('#debug-connect').click();

        $(".form-check-input").each(function(){
            $(this).change(function() {
                let flag1 = $(this).is(':checked');
                if(flag1){
                    $("."+$(this).prop('name')).show()
                }else{
                    $("."+$(this).prop('name')).hide()
                }
            });
        });
        {#versionCheck()#}
    });

    $('#debug-connect').click(function () {
        initializeEnv();
    });

    $('.select-device').change(function() {
        $.ajax({
            url: Host + "/device/packagenames",
            type: "GET",
            async: true,
            cache: false,
            data:{
                platform:platform,
                device:this.value
            },
            beforeSend: function () {
                $('.select-app').empty();
                $('.select-app').append('<option></option>');
                if(platform == 'Android'){
                    $('.select-pid').empty();
                }
                if(lan == 'cn' ){
                    SwalLoading('初始化','正在获取该设备上的所有APP, 请您稍等！');
                }else{
                    SwalLoading('Package initialization!','Initializing Packages, please wait a mmoment.');
                }
                
            },
            success: function (data) {
                if(data['status'] != 1 ) {
                    if(lan == 'cn' ){
                        SwalFire('error', '连接失败','请检查当前移动设备的是否连接了PC端', 2000);
                    }else{
                        SwalFire('error', 'Connect failed !', 'No devices found', 2000);
                    } 
                }else{
                    for(var i=0;i<data['pkgnames'].length;i++){
                        $('.select-app').append('<option>'+data['pkgnames'][i].trim()+'</option>')
                    }
                    swal.close();
                }
            }
        });
    });

    $('.select-app').change(function() {
        if(platform == 'Android'){
            $.ajax({
                url: Host + "/package/pids",
                type: "GET",
                async: true,
                cache: false,
                data:{
                    platform:platform,
                    device:$('.select-device').val(),
                    pkgname:this.value
                },
                beforeSend: function () {
                    if(platform == 'Android'){
                        $('.select-pid').empty();
                    }
                    if(lan == 'cn' ){
                        SwalLoading('初始化','正在获取该APP上的所有进程, 请您稍等！');
                    }else{
                        SwalLoading('Process initialization!','Initializing Process, please wait a mmoment.');
                    }
                },
                success: function (data) {
                    if(data['status'] != 1 ) {
                        if(lan == 'cn' ){
                            SwalFire('warning', '警告','没有发现该app的进程,请检查app是否已经启动', 5000);
                        }else{
                            SwalFire('warning', 'Warning', data['msg'], 5000);
                        } 
                    }else{
                        for(var i=0;i<data['pids'].length;i++){
                            $('.select-pid').append('<option>'+data['pids'][i]+'</option>')
                        }
                        swal.close();
                    }
                }
            });
        }
    });

    function initializeAPM(){
        $.ajax({
            url: Host + "/apm/initialize",
            type: "POST",
            async: true,
            cache: false,
            success: function (data) {
                console.log(data)
            }
        });
    }

    {#function versionCheck(){#}
    {#    $.ajax({#}
    {#        url: Host + "/solox/version",#}
    {#        type: "GET",#}
    {#        async: true,#}
    {#        cache: false,#}
    {#        success: function (data) {#}
    {#            console.log(data)#}
    {#            if(data['lastest_version'] != data['current_version']){#}
    {#                SwalFire('info', 'New Version Found', 'Lastest Version: '+data['lastest_version']+' . Please execute [pip install -U solox].', 60000);#}
    {#            }#}
    {#        },#}
    {#        error: function(error){#}
    {#            console.log(error)#}
    {#        }#}
    {#    });#}
    {#}#}


    function initializeEnv(){
        $.ajax({
            url: Host + "/device/ids?platform="+platform,
            type: "GET",
            async: true,
            cache: false,
            beforeSend: function () {
                $('.select-device').empty();
                $('.select-app').empty();
                $('.select-app').append('<option></option>');
                if(platform == 'Android'){
                    $('.select-pid').empty();
                }
                if(lan == 'cn' ){
                    SwalLoading('初始化','正在初始化设备环境，请您稍等！');
                }else{
                    SwalLoading('Device initialization!','Initializing device environment, please wait a moment.');
                }
                },
            success: function (data) {
                {#console.log(data);#}
                if(data['status'] != 1 ) {
                    if(lan == 'cn' ){
                        SwalFire('error', '连接失败','请检查当前移动设备的是否连接了PC端', 5000);
                    }else{
                        SwalFire('error', 'Connect failed !', 'No devices found', 5000);
                    } 
                }else{
                    for(var i=0;i<data['devices'].length;i++){
                        $('.select-device').append('<option>'+data['devices'][i].trim()+'</option>');
                    }
                    for(var i=0;i<data['pkgnames'].length;i++){
                        $('.select-app').append('<option>'+data['pkgnames'][i].trim()+'</option>');
                    }
                    corenum = data['device_detail']['cpuinfo'];
                    $('#brand').text(data['device_detail']['brand']);
                    $('#device_name').text(data['device_detail']['name']);
                    $('#cpuinfo').text(data['device_detail']['cpuinfo']);
                    $('#os_version').text(data['device_detail']['version']);
                    $('#serialno').text(data['device_detail']['serialno']);
                    $('#wifiadr').text(data['device_detail']['wifiadr']);
                    swal.close();
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error)
            }
        }).then(
            // 此处加同步是为了获取CPU核心数来显示CPU核心频率的图表
            function(){
            seriesCpuFreq = [];
                for (var a = 0; a < corenum; a += 1) {
                seriesCpuFreq.push({
                    name: 'cpufreq' + a,
                    pointInterval: 120 * 1000,
                    data: (function () {
                        var data = [], time = (new Date()).getTime(), i;
                        for (i = -999; i <= 0; i += 1) {
                            data.push([
                                time + i * 1000,
                                Math.round(0)
                            ]);
                        }
                        return data;
                    }())
                });
            }
            //必须初始化一遍，否则会出现图表数据不显示的问题
            cpuFreqInitialize();
            });
    }

    var timerQ = null;

    function getCpuRate(pkgname,device){
        var process = '';
        if(platform == 'Android'){
            process = $('.select-pid').val()
        }
        $.ajax({
            url: Host + "/apm/cpu",
            type: "GET",
            async: true,
            cache: false,
            data:{
                model:'normal',
                platform:platform,
                pkgname:pkgname,
                device:device,
                process:process
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                {#console.log(data)#}
                if(stop == false){
                    if(data['status'] == 1){
                        try {
                            var app_series = cpu_chart.series[0];
                            var sys_series = cpu_chart.series[1];
                            var x = (new Date()).getTime(),
                                y_app = data['appCpuRate'];
                                y_sys = data['systemCpuRate'];
                            app_series.addPoint([x, y_app], true, true);
                            sys_series.addPoint([x, y_sys], true, true);
                            if(data['appCpuRate'] == 0 && data['systemCpuRate'] == 0 && platform == 'Android'){
                                $('.select-pid').empty();
                            }
                            timerQ = setTimeout(getCpuRate(pkgname,device), 1000);
                        }catch (e) {}
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function getCpuFreq(pkgname,device){
        var process = '';
        if(platform == 'Android'){
            process = $('.select-pid').val()
        }
        $.ajax({
            url: Host + "/apm/cpufreq",
            type: "GET",
            async: true,
            cache: false,
            data:{
                model:'normal',
                platform:platform,
                pkgname:pkgname,
                device:device,
                process:process
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                if(stop == false){
                    if(data['status'] == 1){
                        try {

                            for (i = 0; i < corenum; i += 1) {
                                var app_series = cpufreq_chart.series[i];
                                var x = (new Date()).getTime(),
                                    y = data['CpuFreq'][i];
                                app_series.addPoint([x, y], true, true);
                            }
                            timerQ = setTimeout(getCpuFreq(pkgname,device), 1000);
                        }catch (e) {}
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function getGpu(pkgname,device){
        $.ajax({
            url: Host + "/apm/gpu",
            type: "GET",
            async: true,
            cache: false,
            data:{
                platform:platform,
                pkgname:pkgname,
                device:device
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                if(stop == false){
                    {#console.log(data)#}
                    if(data['status'] == 1){
                        try {
                            var series= gpu_chart.series[0];
                            var x = (new Date()).getTime(),
                            y = data['gpu'];
                            series.addPoint([x, y], true, true);
                            timerQ = setTimeout(getGpu(pkgname, device, platform), 1000);
                        }catch (e) {}
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function getBattery(device){
        $.ajax({
            url: Host + "/apm/battery",
            type: "GET",
            async: true,
            cache: false,
            data:{
                platform:platform,
                device:device
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                if(stop == false){
                    {#console.log(data)#}
                    if(data['status'] == 1){
                        try {
                            if(platform == 'Android'){
                                var seriesLevel = battery_chart.series[0];
                                var seriesTemperature = battery_chart.series[1];
                                var x = (new Date()).getTime(),
                                y_level = data['level'],
                                y_temperature = data['temperature'];
                                seriesLevel.addPoint([x, y_level], true, true);
                                seriesTemperature.addPoint([x, y_temperature], true, true);
                                
                            }else{
                                var seriesTemperature = battery_chart.series[0];
                                var seriesCurrent = battery_chart.series[1];
                                var seriesVoltage = battery_chart.series[2];
                                var seriesPower = battery_chart.series[3];
                                var x = (new Date()).getTime(),
                                y_temperature = data['temperature'];
                                y_current = data['current'];
                                y_voltage = data['voltage'];
                                y_power = data['power'];
                                seriesTemperature.addPoint([x, y_temperature], true, true);
                                seriesCurrent.addPoint([x, y_current], true, true);
                                seriesVoltage.addPoint([x, y_voltage], true, true);
                                seriesPower.addPoint([x, y_power], true, true);
                            } 
                            timerQ = setTimeout(getBattery(device), 1000);
                        }catch (e) {}
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function getMemPss(pkgname,device)  {
        var process = '';
        if(platform == 'Android'){
            process = $('.select-pid').val()
        }
        $.ajax({
            url: Host + "/apm/mem",
            type: "GET",
            async: true,
            cache: false,
            data:{
                model:'normal',
                platform:platform,
                pkgname:pkgname,
                device:device,
                process:process
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                {#console.log(data)#}
                if(stop == false){
                    if(data['status'] == 1){
                        try {
                            if(platform == 'Android'){
                                var seriesTotal = mem_chart.series[0];
                                var seriesSwap = mem_chart.series[1];
                                var x = (new Date()).getTime(),
                                    y_total = data['totalPass'],
                                    y_swap = data['swapPass'];
                                seriesTotal.addPoint([x, y_total], true, true);
                                seriesSwap.addPoint([x, y_swap], true, true);
                            }else{
                                var series = mem_chart.series[0];
                                var x = (new Date()).getTime(),
                                    y = data['totalPass'];
                                series.addPoint([x, y], true, true);
                            }
                            timerQ = setTimeout(getMemPss(pkgname,device), 1000);

                        }catch (e) {}
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function getMemDetailPss(pkgname,device)  {
        var process = $('.select-pid').val();
        $.ajax({
            url: Host + "/apm/mem/detail",
            type: "GET",
            async: true,
            cache: false,
            data:{
                platform:platform,
                pkgname:pkgname,
                device:device,
                process:process
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                {#console.log(data)#}
                if(stop == false){
                    if(data['status'] == 1){
                        try {
                            var seriesJava = mem_detail_chart.series[0];
                            var seriesNative = mem_detail_chart.series[1];
                            var seriesCode = mem_detail_chart.series[2];
                            var seriesStack = mem_detail_chart.series[3];
                            var seriesGraphics = mem_detail_chart.series[4];
                            var seriesPrivate = mem_detail_chart.series[5];
                            var seriesSystem = mem_detail_chart.series[6];

                            var x = (new Date()).getTime(),
                                y_java = data['memory_detail']['java_heap'],
                                y_native = data['memory_detail']['native_heap'];
                                y_code = data['memory_detail']['code_pss'];
                                y_stack = data['memory_detail']['stack_pss'];
                                y_graphics = data['memory_detail']['graphics_pss'];
                                y_private = data['memory_detail']['private_pss'];
                                y_system = data['memory_detail']['system_pss'];
                            
                            seriesJava.addPoint([x, y_java], true, true);
                            seriesNative.addPoint([x, y_native], true, true);
                            seriesCode.addPoint([x, y_code], true, true);
                            seriesStack.addPoint([x, y_stack], true, true);
                            seriesGraphics.addPoint([x, y_graphics], true, true);
                            seriesPrivate.addPoint([x, y_private], true, true);
                            seriesSystem.addPoint([x, y_system], true, true);
                            
                            timerQ = setTimeout(getMemDetailPss(pkgname,device), 1000);

                        }catch (e) {}
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function setNetWork(type,device,pkgname,net_switch){
        var process = '';
        if(platform == 'Android'){
            process = $('.select-pid').val()
        }
        $.ajax({
            url: Host + "/apm/set/network",
            type: "GET",
            async: true,
            cache: false,
            data:{
                platform:platform,
                pkgname:pkgname,
                device:device,
                wifi_switch: net_switch,
                type: type,
                process:process
            },
            success: function (data) {
                if(data['status'] != 1){
                    SwalFire('error','Something error',data['msg'],2000);
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function getNetWork(pkgname,device,net_switch)  {
        var process = '';
        if(platform == 'Android'){
            process = $('.select-pid').val()
        }
        $.ajax({
            url: Host + "/apm/network",
            type: "GET",
            async: true,
            cache: false,
            data:{
                model:'normal',
                platform:platform,
                pkgname:pkgname,
                device:device,
                wifi_switch: net_switch,
                process:process
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                if(stop == false){
                    if(data['status'] == 1){
                        try {
                            var seriesUpFlow = network_chart.series[0];
                            var seriesDownFlow = network_chart.series[1];
                            var x_up = (new Date()).getTime(),
                                y_up = data['upflow'];
                            var x_down = (new Date()).getTime(),
                                y_down = data['downflow'];
                            seriesUpFlow.addPoint([x_up, y_up], true, true);
                            seriesDownFlow.addPoint([x_down, y_down], true, true);
                            timerQ = setTimeout(getNetWork(pkgname,device,net_switch), 1000);
                        }catch (e) {
                            console.log(e)
                        }
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    function getFps(pkgname,device,fps_switch)  {
        $.ajax({
            url: Host + "/apm/fps",
            type: "GET",
            async: true,
            cache: false,
            data:{
                model:'normal',
                platform:platform,
                pkgname:pkgname,
                device:device,
                surv:fps_switch
            },
            beforeSend: function () {
               window.clearTimeout(timerQ);
            },
            success: function (data) {
                {#console.log(data)#}
                if(stop == false){
                    if(data['status'] == 1){
                        try {
                            let seriesFps = fps_chart.series[0];
                            <!--x轴获取当前时间作为x轴坐标-->
                            let x_fps = (new Date()).getTime(),
                                y_fps = data['fps'];
                            seriesFps.addPoint([x_fps, y_fps], true, true);
                            if(platform == 'Android'){
                                let seriesBigJank = fps_chart.series[2];
                                let seriesJank = fps_chart.series[1];
                                let seriesStutter = fps_chart.series[3];
                                let x_bigjank = (new Date()).getTime(),
                                    y_bigjank= data['bigjank'];
                                let x_jank = (new Date()).getTime(),
                                    y_jank = data['jank'];
                                let x_Stutter = (new Date()).getTime(),
                                    y_Stutter = data['Stutter'];
                                seriesBigJank.addPoint([x_bigjank, y_bigjank], true, true);
                                seriesJank.addPoint([x_jank, y_jank], true, true);
                                seriesStutter.addPoint([x_Stutter, y_Stutter], true, true)
                            }
                            <!--设定定时器，1秒后重新获取数据-->
                            timerQ = setTimeout(getFps(pkgname,device,fps_switch), 1000);
                        }catch (e) {}
                    }else{
                        SwalFire('error','Something error',data['msg'],2000);
                    }
                }
            },
            error: function(error){
                SwalFire('error','Server Error','Please press [ctrl+shift+i] and provide the browser\'s error message',5000);
                console.log(error);
            }
        });
    }

    var rangeSelector =  {
        buttons: [{
            count: 1,
            type: 'minute',
            text: '1min'
        }, {
            count: 5,
            type: 'minute',
            text: '5min'
        }, {
            type: 'all',
            text: 'All'
        }],
        inputEnabled: false,
        selected: 0
    };


    var series =  [{
        name : 'value',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesNet = [{
        name : 'send',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'recieve',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesCpu = [{
        name : 'app',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'total',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesCpuFreq = [];

    var seriesGpu = [{
        name : 'total',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesMem = [{
        name : 'total',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'swap',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesMemDetail = [{
        name : 'java',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'native',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'code',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'stack',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'graphics',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'private',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'system',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesBettery = [{
        name : 'level',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'temperature',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesiOSBettery = [{
        name : 'temperature',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'current',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'voltage',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'power',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesFps =  [{
        name : 'fps',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'jank',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'bigjank',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    },{
        name : 'Stutter(%)',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    var seriesFpsbyiOS =  [{
        name : 'fps',
        pointInterval: 120 * 1000,
        data : (function () {
            var data = [], time = (new Date()).getTime(), i;
            for (i = -999; i <= 0; i += 1) {
                data.push([
                    time + i * 1000,
                    Math.round(0)
                ]);
            }
            return data;
        }())
    }];

    function setPlotLine(target) {
        var value = 0;
        switch (target) {
            case 'cpu':
                value = parseInt($('#cpu_warning_value').val());
                break;
            case 'mem':
                value = parseInt($('#mem_warning_value').val());
                break;
            case 'fps':
                value = parseInt($('#fps_warning_value').val());
                break;
            case 'battery':
                value = parseInt($('#battery_warning_value').val());
                break;
            case 'upflow':
                value = parseInt($('#upflow_warning_value').val());
                break;
            case 'downflow':
                value = parseInt($('#down_warning_value').val());
                break;
        }
        var plotLines = [];

        if(value != 0){
            plotLines = [{
                value: value,
                color: 'red',
                dashStyle: 'shortdash',
                width: 2,
                label: {
                    text: 'warning value : '+value,
                    style: {
                        'color': 'white',
                    }
                }
            }];
        }
        return plotLines;
    }

    function chartsInitialize(apmType,title){
        let seriesFinal = series;
        let legend = false;
        let yAxis = {
            opposite:false,
            plotLines:setPlotLine(apmType)
        };
        let yAxis_plot = {
            opposite:false,
            plotLines:setPlotLine(apmType)
        };
        switch (apmType) {
            case 'fps':
                seriesFinal = seriesFps;
                legend = true;
                yAxis = yAxis_plot;
                break;
            case 'fps_ios':
                seriesFinal = seriesFpsbyiOS;
                yAxis = yAxis_plot;
                break;
            case 'network':
                seriesFinal = seriesNet;
                legend = true;
                break;
            case 'cpu':
                seriesFinal = seriesCpu;
                legend = true;
                yAxis = yAxis_plot;
                break;
            case 'cpufreq':
                seriesFinal = seriesCpuFreq;
                legend = true;
                yAxis = yAxis_plot;
                break;
            case 'mem_android':
                seriesFinal = seriesMem;
                legend = true;
                break;
            case 'mem_detail':
                seriesFinal = seriesMemDetail;
                legend = true;
                break;    
            case 'battery_android':
                seriesFinal = seriesBettery;
                legend = true;
                yAxis = yAxis_plot;
                break;
            case 'battery_ios':
                seriesFinal = seriesiOSBettery;
                legend = true;
                yAxis = yAxis_plot;
                break;    
        }

        let apm_chart = Highcharts.stockChart(apmType, {
            rangeSelector: rangeSelector,
            title : {
                text : title
            },
            tooltip: {
                split: false
            },
            legend: {
                enabled:legend
            },
            credits:{
                enabled: false
            },
            scrollbar : {
                enabled : true
            },
            navigator : {
                enabled : false
            },
            exporting: {
                enabled: false
            },
            yAxis: yAxis,
            series : seriesFinal
        });

        return apm_chart
    };

    function cpuInitialize(){
        let type = 'cpu';
        let cpu_chart = chartsInitialize(type,'CPU Usage (%)');
        return cpu_chart
    }

    function cpuFreqInitialize(){
        let type = 'cpufreq';
        let cpufreq_chart = chartsInitialize(type,'CPU Freq (HZ)');
        return cpufreq_chart
    }

    function batteryInitialize(){
        let type = platform == 'Android' ? 'battery_android' : 'battery_ios';
        let battery_chart = chartsInitialize(type,'Battery');
        return battery_chart
    }

    function memInitialize(){
        let type = platform == 'Android' ? 'mem_android' : 'mem_ios';
        let mem_chart = chartsInitialize(type,'Memory Usage (MB)');
        return mem_chart
    }

    function memDetailInitialize(){
        if(platform == 'Android'){
            let mem_detail_chart = chartsInitialize('mem_detail','Memory Detail (MB)');
            return mem_detail_chart
        }
    }

    function networkInitialize(){
        let network_chart = chartsInitialize('network','Network Usage (KB)');
        return network_chart
    }

    function gpuInitialize(){
        let gpu_chart = chartsInitialize('gpu','GPU Usage (%)');
        return gpu_chart
    }

    function fpsInitialize(){
        if(platform === 'Android'){
            let title = 'FPS(HZ) & Jank(Times) & BigJank(Times) & Stutter(%)';
            let fps_chart = chartsInitialize('fps',title);
            return fps_chart
        }else{
            let title = 'FPS (HZ/s)';
            let fps_chart = chartsInitialize('fps_ios',title);
            return fps_chart
        }
    }

    var cpu_chart = cpuInitialize();
    var cpufreq_chart = cpuFreqInitialize();
    var mem_chart = memInitialize();
    var mem_detail_chart = memDetailInitialize();
    var network_chart = networkInitialize();
    var fps_chart = fpsInitialize();
    var battery_chart = batteryInitialize();
    var gpu_chart = gpuInitialize();

    function collectPers(device,pkgname=null,type,title,func){
        let seriesFinal = series;
        let legend = false;
        let yAxis = {
            opposite:false,
            plotLines:setPlotLine(type)
        };
        let yAxis_plot = {
            opposite:false,
            plotLines:setPlotLine(type)
        };
        switch (type) {
            case 'fps':
                seriesFinal = seriesFps;
                legend = true;
                yAxis = yAxis_plot;
                break;
            case 'fps_ios':
                seriesFinal = seriesFpsbyiOS;
                legend = true;
                yAxis = yAxis_plot;
                break;
            case 'network':
                seriesFinal = seriesNet;
                legend = true;
                break;
            case 'cpu':
                seriesFinal = seriesCpu;
                yAxis = yAxis_plot;
                legend = true;
                break;
            case 'cpufreq':
                seriesFinal = seriesCpuFreq;
                yAxis = yAxis_plot;
                legend = true;
                break;
            case 'gpu':
                seriesFinal = seriesGpu;
                yAxis = yAxis_plot;
                legend = true;
                break;
            case 'mem_android':
                seriesFinal = seriesMem;
                legend = true;
                break;
            case 'mem_detail':
                seriesFinal = seriesMemDetail;
                legend = true;
                break;    
            case 'battery_android':
                seriesFinal = seriesBettery;
                legend = true;
                yAxis = yAxis_plot;
                break;
            case 'battery_ios':
                seriesFinal = seriesiOSBettery;
                legend = true;
                yAxis = yAxis_plot;
                break;
            default:
                seriesFinal = series;
                break;
        }

        let chartPers = Highcharts.stockChart(type, {
            chart : {
                events : {
                    load : func
                }
            },
            rangeSelector: rangeSelector,
            title : {
                text : title
            },
            tooltip: {
                split: false
            },
            legend: {
                enabled:legend
            },
            credits:{
                enabled: false
            },
            scrollbar : {
                enabled : true
            },
            navigator : {
                enabled : false
            },
            exporting: {
                enabled: false
            },
            yAxis: yAxis,
            series : seriesFinal
        });

        return chartPers;

  }

    function collectCpu(device,pkgname){
        var cpu_checkbox = $('#cpu_checkbox').is(':checked');
        if(cpu_checkbox){
            {#cpuInitialize();#}
            let type = 'cpu';
            cpu_chart = collectPers(device,pkgname,type,'CPU Usage (%)',getCpuRate(pkgname,device));
        }
    }

    function collectCpuFreq(device,pkgname){
        var cpufreq_checkbox = $('#cpufreq_checkbox').is(':checked');
        if(cpufreq_checkbox) {
            cpuFreqInitialize();
            let type = 'cpufreq';
            cpufreq_chart = collectPers(device, pkgname, type, 'CPU Freq(GHZ)', getCpuFreq(pkgname, device));
            console.error(cpufreq_chart)
        }
    }

    function collectGpu(device,pkgname){
        var gpu_checkbox = $('#gpu_checkbox').is(':checked');
        if(gpu_checkbox){
            gpuInitialize();
            gpu_chart = collectPers(device,pkgname,'gpu','GPU Usage (%)',getGpu(pkgname,device));
        }
    }

    function collectBattery(device){
        var battery_checkbox = $('#battery_checkbox').is(':checked');
        if(battery_checkbox){
            batteryInitialize();
            let type = platform == 'Android' ? 'battery_android' : 'battery_ios';
            battery_chart = collectPers(device,null,type,'Battery',getBattery(device));
        }
    }

    function collectMem(device,pkgname){
        var mem_checkbox = $('#mem_checkbox').is(':checked');
        if(mem_checkbox){
            memInitialize();
            let type = platform == 'Android' ? 'mem_android' : 'mem_ios';
            mem_chart = collectPers(device,pkgname,type,'Memory Usage (MB)',getMemPss(pkgname,device));
        }
    }

    function collectMemDetail(device,pkgname){
        var mem_detail_checkbox = $('#mem_detail_checkbox').is(':checked');
        {#console.error("我点了内存");#}
        if(mem_detail_checkbox){
            memDetailInitialize();
            mem_detail_chart = collectPers(device,pkgname,'mem_detail','Memory Detail (MB)',getMemDetailPss(pkgname,device));
        }
    }

    function collectNetwork(device,pkgname){
        var flow_checkbox = $('#flow_checkbox').is(':checked');
        var net_switch = $('#net-switch').is(':checked');
        if(flow_checkbox){
            networkInitialize();
            network_chart = collectPers(device,pkgname,'network','Network Usage (KB)',getNetWork(pkgname,device,net_switch));
        }
    }

    function collectFps(device,pkgname){
        var fps_checkbox = $('#fps_checkbox').is(':checked');
        var fps_switch = $('#fps-switch').is(':checked');
        {#console.log(fps_switch)#}
        if(fps_checkbox){
            fpsInitialize();
            if(platform == 'Android'){
                let title = 'FPS(HZ) & Jank(Times) & BigJank(Times) & Stutter(%)';
                fps_chart = collectPers(device,pkgname,'fps',title,getFps(pkgname,device,fps_switch));
            }else{
                let title = 'FPS（HZ）';
                fps_chart = collectPers(device,pkgname,'fps_ios',title,getFps(pkgname,device,fps_switch));
            }
        }
    }

    function cast(){
        var device = $('.select-device').val();
        if(device){
            $.ajax({
                url: "/apm/record/cast",
                type: "GET",
                async: true,
                cache: false,
                data:{
                    platform:platform,
                    device:$('.select-device').val(),
                },
                beforeSend: function () {
                    SwalLoading('Casting','')
                },
                success: function (data) {
                    if(data['status']==0){
                        SwalFire('error','Cast Failed',data['msg'],2000)
                    }
                },
                complete: function(){
                    swal.close();
                },
                error: function(error){
                    SwalFire('error','Scrcpy Error',error ,5000);
                    console.log(error);
                }
            });
        }else{
            SwalFire('error', 'Cast failed !', 'No devices found', 5000);
        }
    }

    function record(){
        $.ajax({
            url: "/apm/record/start",
            type: "GET",
            async: true,
            cache: false,
            data:{
                platform:platform,
                device:$('.select-device').val(),
            },
            success: function (data) {
                if(data['status']==0){
                    SwalFire('error','Record Failed',data['msg'],2000)
                }
            },
            error: function(error){
                SwalFire('error','Scrcpy Error',error ,5000);
                console.log(error);
            }
        });
    }

    function stopTask(){
        stop = true;
        var wifi_switch = $('#net-switch').is(':checked');
        var record_switch = $('#record-switch').is(':checked');
        $('#run-apm').show();
        $('#stop-apm').hide();
        window.clearTimeout(timerQ);
        var process = '';
        if(platform == 'Android'){
            process = $('.select-pid').val()
        }
        $.ajax({
            url: "/apm/create/report",
            type: "GET",
            async: true,
            cache: false,
            data:{
                platform:platform,
                corenum:corenum,
                model:'normal',
                app:$('.select-app').val(),
                devices:$('.select-device').val(),
                wifi_switch:wifi_switch,
                process:process,
                record_switch:record_switch
            },
            beforeSend: function () {
                if(lan == 'cn'){
                    SwalLoading('保存数据','正在保存数据生成报告, 请不要离开页面.')
                }else{
                    SwalLoading('Saving Data','Saving data to generate report, please do not leave.')
                }
            },
            success: function (data) {
                if(data['status']==1){
                    window.location.href = '/report?lan='+lan
                }else{
                    SwalFire('error','Execution Error',data['msg'],2000)
                }
            }
        });
    }
    
    $('#run-apm').click(function () {
        stop = false;
        $('#stop-apm').show();
        $('#run-apm').hide();
        initializeAPM();
        let device = $('.select-device').val();
        let pkgname = $('.select-app').val();
        if(device && pkgname){
            var net_switch = $('#net-switch').is(':checked');
            if(platform == 'Android'){
                setNetWork('pre',device,pkgname,net_switch)
                var record_switch = $('#record-switch').is(':checked');
                if(record_switch){
                    record()
                }
            }
            collectFps(device,pkgname);
            collectMem(device,pkgname);
            collectBattery(device);
            collectCpu(device,pkgname);
            collectCpuFreq(device,pkgname);
            
            if(platform == 'Android'){
                var isCheck = $('#mem_detail_checkbox').is(':checked');
                if(isCheck){
                    collectMemDetail(device, pkgname);
                }
            }
            collectGpu(device,pkgname);
            collectNetwork(device,pkgname);
            if(parseInt($('#duration').val()) > 0){
                var times = parseInt($('#duration').val()) * 60 * 1000
                setTimeout("stopTask()", times)
            }
        }else{
            if(lan == 'cn'){
                SwalFire('error','执行错误','没有选择APP或者设备',2000);
            }else{
                SwalFire('error','Execution Error','No device or package name selected',2000);
            }
            $('#run-apm').show();
            $('#stop-apm').hide();
        }});

    var status = false;
    let socket = null;


    if(platform == 'Android'){
        socket = io.connect('http://' + document.domain + ':' + location.port + '/logcat',{'forceNew':true });
    }

    let logBuffer = '';

    function startLogcat() {
        let device = $('.select-device').val();
        if(device){
            $('#run-logcat').hide();
            $('#stop-logcat').show();
            if(!socket) {
                socket = io.connect('http://' + document.domain + ':' + location.port + '/logcat', {'forceNew': true});
                socket.on('message', function (msg) {
                    if (status) {
                        logBuffer += msg.data + '<br>';
                        {#$('#logcat-content').prepend(msg.data + '<br>');#}
                    }
                });
                setInterval(function (){
                    if(logBuffer) {
                        $('#logcat-content').prepend(logBuffer);
                        logBuffer = '';
                    }
            }, 1000);
            }
        }else{
            SwalFire('error','Execution Error','No device selected',2000)
        }
    }

    function stopLogcat() {
        $('#run-logcat').show();
        $('#stop-logcat').hide();
        status = false;
        // socket.emit('disconnect_request');
        socket.close()
        socket = null

    }

    function cppyLogcat() {
        const textValue = document.createElement('textarea');
        document.body.appendChild(textValue);
        textValue.value = $("#logcat-content").text(); 
        textValue.select();
        var result = document.execCommand('copy');
        {#console.log(result)#}
        document.body.removeChild(textValue);
        SwalFire('success','Copy Success','',1000);
    }

    function clearLogcat() {
        $('#logcat-content').empty();
    }
    
    function getCurActivity(){
        let device = $('.select-device').val();
        if(device){
            $.ajax({
                url: "/package/activity",
                type: "GET",
                async: true,
                cache: false,
                data:{
                    platform:platform,
                    device:$('.select-device').val(),
                },
                beforeSend: function () {
                    SwalLoading('Loading','')
                },
                success: function (data) {
                    if(data['status']==1){
                        $('#activity').val(data['activity']);
                    }else{
                        SwalFire('error','Execution Error',data['msg'],2000)
                    }
                },
                complete: function(){
                    swal.close();
                }
            });
        }else{
            SwalFire('error','Execution Error','No devices found',2000)
        }
    }

    function getStartupTimeByAndroid(){
        let device = $('.select-device').val();
        let activity = $('#activity').val().trim();
        if(device && activity){
            $.ajax({
                url: "/package/start/time/android",
                type: "GET",
                async: true,
                cache: false,
                data:{
                    platform:platform,
                    device:$('.select-device').val(),
                    activity: activity
                },
                beforeSend: function () {
                    SwalLoading('Loading','')
                },
                success: function (data) {
                    if(data['status']==1){
                        {#console.log(data['time'])#}
                        $('#startup-time-content').text(data['time']);
                    }else{
                        SwalFire('error','Execution Error',data['msg'],2000)
                    }
                },
                complete: function(){
                    swal.close();
                }
            });
        }else{
            SwalFire('error','Execution Error','No devices or activity found',2000)
        }
    }

    function getStartupTimeByiOS(){
        let pkgname = $('.select-app').val();
        if(pkgname){
            $.ajax({
                url: "/package/start/time/ios",
                type: "GET",
                async: true,
                cache: false,
                data:{
                    pkgname:pkgname
                },
                beforeSend: function () {
                    SwalLoading('Loading','')
                },
                success: function (data) {
                    if(data['status']==1){
                        {#console.log(data['time'])#}
                        $('#startup-time-content').text(data['time']);
                    }else{
                        SwalFire('error','Execution Error',data['msg'],2000)
                    }
                },
                complete: function(){
                    swal.close();
                }
            });
        }else{
            SwalFire('error','Execution Error','No package found',2000)
        }
    }

    function install(){
        var fileObj = document.getElementById("app-file").files[0];
        var type = (fileObj) ? 'file' : 'link'
        if(type == 'file'){
            installFile()
        }else{
            installLink()
        }

    }

    function installLink(){
        var formData = new FormData();
        var link = $('.app-link').val().trim()
        formData.append('platform','{{ platform }}');
        formData.append('link',link);
        if(link){
            $.ajax({
                url: "/apm/install/link",
                type: "POST",
                async: true,
                cache: false,
                processData: false,
                contentType: false,
                data:formData,
                beforeSend: function () {
                    SwalLoading('Install App!','Installing file to device, please wait a moment.');
                },
                success: function (data) {
                    {#console.log(data);#}
                    if(data['status'] != 1 ) {
                        SwalFire('error', 'Install failed !', data['msg'], 2000);
                    }else{
                        SwalFire('success', 'Install success !', '', 2000);
                    }
                },
                error:function (data) {
                    SwalFire('error', 'Install failed !', '', 2000);
                }
            });
        }else{
            SwalFire('error', 'Install failed !', 'No link found', 2000);
        }
    }

    function installFile(){
        var formData = new FormData();
        var fileObj = document.getElementById("app-file").files[0];
        formData.append('platform','{{ platform }}');
        formData.append('file',fileObj);
        $.ajax({
            url: "/apm/install/file",
            type: "POST",
            async: true,
            cache: false,
            processData: false,
            contentType: false,
            data:formData,
            beforeSend: function () {
                SwalLoading('Install App!','Installing file to device, please wait。');
                },
            success: function (data) {
                {#console.log(data);#}
                if(data['status'] != 1 ) {
                    SwalFire('error', 'Install failed !', data['msg'], 2000);
                }else{
                    SwalFire('success', 'Install success !', '', 2000);
                }
            },
            error:function (data) {
                SwalFire('error', 'Install failed !', '', 2000);
            }
        });
    }

</script>
{% endblock %}